cursor-renderer/native: Don't trigger redraw when cursor hidden

When a cursor is hidden, the native backend will properly hide the HW
cursor sprite as well, but it would communicate this as if the cursor
was not handled by the backend, while in fact it still was. This caused
the generic cursor rendering layer to queue a redraw.

https://gitlab.gnome.org/GNOME/mutter/issues/77
This commit is contained in:
Jonas Ådahl 2018-05-11 13:23:39 +02:00
parent 7412794c66
commit 596b30096d

View File

@ -685,7 +685,10 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *renderer,
priv->has_hw_cursor = should_have_hw_cursor (renderer, cursor_sprite); priv->has_hw_cursor = should_have_hw_cursor (renderer, cursor_sprite);
update_hw_cursor (native, cursor_sprite); update_hw_cursor (native, cursor_sprite);
return priv->has_hw_cursor;
return (priv->has_hw_cursor ||
!cursor_sprite ||
!meta_cursor_sprite_get_cogl_texture (cursor_sprite));
} }
static void static void