summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-02-23 10:52:59 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2014-02-23 10:54:32 -0500
commit751154d9daaa3bd55b355f02af636d4b4322328a (patch)
tree49979accaaf8b71178191eace1474ca637a6396d /src
parent29addc499ca0f8dc5bf9cf6d18eaaa01a5c2b985 (diff)
shell-util: Fix warning in shell_util_cursor_tracker_to_clutter
If the sprite is NULL, like if a Wayland app wanted to hide the cursor, then we need to hide the ClutterTexture on our side, as ClutterTexture has no easy way to tell it to paint nothing.
Diffstat (limited to 'src')
-rw-r--r--src/shell-util.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/shell-util.c b/src/shell-util.c
index bbbb86fc..61676ecd 100644
--- a/src/shell-util.c
+++ b/src/shell-util.c
@@ -347,5 +347,13 @@ shell_util_cursor_tracker_to_clutter (MetaCursorTracker *tracker,
CoglTexture *sprite;
sprite = meta_cursor_tracker_get_sprite (tracker);
- clutter_texture_set_cogl_texture (texture, sprite);
+ if (sprite)
+ {
+ clutter_actor_show (CLUTTER_ACTOR (texture));
+ clutter_texture_set_cogl_texture (texture, sprite);
+ }
+ else
+ {
+ clutter_actor_hide (CLUTTER_ACTOR (texture));
+ }
}