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.
This commit is contained in:
Jasper St. Pierre 2014-02-23 10:52:59 -05:00
parent 29addc499c
commit 751154d9da

View File

@ -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));
}
}