[mutter] cursor-renderer/native: Don't trigger redraw when cursor hidden
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cursor-renderer/native: Don't trigger redraw when cursor hidden
- Date: Fri, 15 Jun 2018 19:13:31 +0000 (UTC)
commit 596b30096d86961506705dda134e9ee2330370fa
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri May 11 13:23:39 2018 +0200
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
src/backends/native/meta-cursor-renderer-native.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/native/meta-cursor-renderer-native.c
b/src/backends/native/meta-cursor-renderer-native.c
index c8ebe3bff..910eb10ec 100644
--- a/src/backends/native/meta-cursor-renderer-native.c
+++ b/src/backends/native/meta-cursor-renderer-native.c
@@ -685,7 +685,10 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *renderer,
priv->has_hw_cursor = should_have_hw_cursor (renderer, 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]