mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
cursor-renderer: Keep ref to displayed cursor sprite
If it'd end up beig the XCursor sprite, it'll be unref:ed by the cursor tracker when receiving a XFixesCursorNotify:XFixesDisplayCursorNotify X11 event. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391
This commit is contained in:
parent
5f5ef704fc
commit
a10f35c613
@ -238,6 +238,8 @@ meta_cursor_renderer_finalize (GObject *object)
|
|||||||
|
|
||||||
g_clear_signal_handler (&priv->after_paint_handler_id, stage);
|
g_clear_signal_handler (&priv->after_paint_handler_id, stage);
|
||||||
|
|
||||||
|
g_clear_object (&priv->displayed_cursor);
|
||||||
|
|
||||||
G_OBJECT_CLASS (meta_cursor_renderer_parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_cursor_renderer_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +364,7 @@ meta_cursor_renderer_set_cursor (MetaCursorRenderer *renderer,
|
|||||||
|
|
||||||
if (priv->displayed_cursor == cursor_sprite)
|
if (priv->displayed_cursor == cursor_sprite)
|
||||||
return;
|
return;
|
||||||
priv->displayed_cursor = cursor_sprite;
|
g_set_object (&priv->displayed_cursor, cursor_sprite);
|
||||||
|
|
||||||
meta_cursor_renderer_update_cursor (renderer, cursor_sprite);
|
meta_cursor_renderer_update_cursor (renderer, cursor_sprite);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user