cursor-renderer: Add API to allow inhibiting HW cursor

There may be reasons to temporarly inhibit the HW cursor under certain
circumstances. Allow adding such inhibitations by adding API to the
cursor renderer to allow API users to add generic inhibitors with
whatever logic is deemed necessary.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
This commit is contained in:
Jonas Ådahl
2018-09-13 11:28:51 +02:00
parent 328eff7352
commit 79d99cbe3f
3 changed files with 88 additions and 0 deletions

View File

@ -586,6 +586,10 @@ should_have_hw_cursor (MetaCursorRenderer *renderer,
if (!cursor_sprite)
return FALSE;
if (meta_cursor_renderer_is_hw_cursors_inhibited (renderer,
cursor_sprite))
return FALSE;
for (l = gpus; l; l = l->next)
{
MetaGpuKms *gpu_kms = l->data;