Commit 768b425c authored by Benjamin Otte's avatar Benjamin Otte Committed by Matthias Clasen
Browse files

x11: Use g_object_(un)ref instead of gdk_cursor_(un)ref

parent 0b4913a1
...@@ -98,7 +98,7 @@ add_to_cache (GdkX11Cursor* cursor) ...@@ -98,7 +98,7 @@ add_to_cache (GdkX11Cursor* cursor)
cursor_cache = g_slist_prepend (cursor_cache, cursor); cursor_cache = g_slist_prepend (cursor_cache, cursor);
/* Take a ref so that if the caller frees it we still have it */ /* 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 /* Returns 0 on a match
...@@ -261,7 +261,7 @@ _gdk_x11_display_get_cursor_for_type (GdkDisplay *display, ...@@ -261,7 +261,7 @@ _gdk_x11_display_get_cursor_for_type (GdkDisplay *display,
if (private) if (private)
{ {
/* Cache had it, add a ref for this user */ /* Cache had it, add a ref for this user */
gdk_cursor_ref ((GdkCursor*) private); g_object_ref (private);
return (GdkCursor*) private; return (GdkCursor*) private;
} }
...@@ -671,7 +671,7 @@ _gdk_x11_display_get_cursor_for_name (GdkDisplay *display, ...@@ -671,7 +671,7 @@ _gdk_x11_display_get_cursor_for_name (GdkDisplay *display,
if (private) if (private)
{ {
/* Cache had it, add a ref for this user */ /* Cache had it, add a ref for this user */
gdk_cursor_ref ((GdkCursor*) private); g_object_ref (private);
return (GdkCursor*) private; return (GdkCursor*) private;
} }
......
...@@ -134,8 +134,8 @@ static void ...@@ -134,8 +134,8 @@ static void
gdk_window_impl_x11_init (GdkWindowImplX11 *impl) gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
{ {
impl->toplevel_window_type = -1; impl->toplevel_window_type = -1;
impl->device_cursor = g_hash_table_new_full (NULL, NULL, NULL, impl->device_cursor = g_hash_table_new_full (NULL, NULL,
(GDestroyNotify) gdk_cursor_unref); NULL, g_object_unref);
} }
GdkToplevelX11 * GdkToplevelX11 *
...@@ -2509,7 +2509,7 @@ gdk_window_x11_set_device_cursor (GdkWindow *window, ...@@ -2509,7 +2509,7 @@ gdk_window_x11_set_device_cursor (GdkWindow *window,
{ {
_gdk_x11_cursor_update_theme (cursor); _gdk_x11_cursor_update_theme (cursor);
g_hash_table_replace (impl->device_cursor, g_hash_table_replace (impl->device_cursor,
device, gdk_cursor_ref (cursor)); device, g_object_ref (cursor));
} }
if (!GDK_WINDOW_DESTROYED (window)) if (!GDK_WINDOW_DESTROYED (window))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment