[gtk+/gdk-backend] x11: Use g_object_(un)ref instead of gdk_cursor_(un)ref
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend] x11: Use g_object_(un)ref instead of gdk_cursor_(un)ref
- Date: Mon, 20 Dec 2010 13:14:37 +0000 (UTC)
commit 005a6ce4ac0328a5889b84f02df08a11f9f547d6
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 20 03:12:33 2010 +0100
x11: Use g_object_(un)ref instead of gdk_cursor_(un)ref
gdk/x11/gdkcursor-x11.c | 6 +++---
gdk/x11/gdkwindow-x11.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index b5bf69c..efbc96f 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -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;
}
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 7c299c9..4f99b02 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]