x11: Use g_object_(un)ref instead of gdk_cursor_(un)ref
This commit is contained in:
committed by
Matthias Clasen
parent
0b4913a166
commit
768b425ce6
@ -98,7 +98,7 @@ add_to_cache (GdkX11Cursor* cursor)
|
||||
cursor_cache = g_slist_prepend (cursor_cache, cursor);
|
||||
|
||||
/* Take a ref so that if the caller frees it we still have it */
|
||||
gdk_cursor_ref ((GdkCursor*) cursor);
|
||||
g_object_ref (cursor);
|
||||
}
|
||||
|
||||
/* Returns 0 on a match
|
||||
@ -261,7 +261,7 @@ _gdk_x11_display_get_cursor_for_type (GdkDisplay *display,
|
||||
if (private)
|
||||
{
|
||||
/* Cache had it, add a ref for this user */
|
||||
gdk_cursor_ref ((GdkCursor*) private);
|
||||
g_object_ref (private);
|
||||
|
||||
return (GdkCursor*) private;
|
||||
}
|
||||
@ -671,7 +671,7 @@ _gdk_x11_display_get_cursor_for_name (GdkDisplay *display,
|
||||
if (private)
|
||||
{
|
||||
/* Cache had it, add a ref for this user */
|
||||
gdk_cursor_ref ((GdkCursor*) private);
|
||||
g_object_ref (private);
|
||||
|
||||
return (GdkCursor*) private;
|
||||
}
|
||||
|
||||
@ -134,8 +134,8 @@ static void
|
||||
gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
|
||||
{
|
||||
impl->toplevel_window_type = -1;
|
||||
impl->device_cursor = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) gdk_cursor_unref);
|
||||
impl->device_cursor = g_hash_table_new_full (NULL, NULL,
|
||||
NULL, g_object_unref);
|
||||
}
|
||||
|
||||
GdkToplevelX11 *
|
||||
@ -2509,7 +2509,7 @@ gdk_window_x11_set_device_cursor (GdkWindow *window,
|
||||
{
|
||||
_gdk_x11_cursor_update_theme (cursor);
|
||||
g_hash_table_replace (impl->device_cursor,
|
||||
device, gdk_cursor_ref (cursor));
|
||||
device, g_object_ref (cursor));
|
||||
}
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
|
||||
Reference in New Issue
Block a user