Skip to contentSkip to conversation

gtk: don't use g_object_ref on GdkCursor

PATCH Superseded Anthony Liguori 2 participants 3 messages Jun 3, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gtk: don't use g_object_ref on GdkCursor

It's not a GObject.

---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ui/gtk.c +1 -1
index 8dc9041..3bc2842 100644
@@ -377,7 +377,7 @@ static void gd_cursor_define(DisplayChangeListener *dcl,
                                         pixbuf, c->hot_x, c->hot_y);
     gdk_window_set_cursor(gtk_widget_get_window(s->drawing_area), cursor);
     g_object_unref(pixbuf);
-    g_object_unref(cursor);
+    gdk_cursor_unref(cursor);
 }
 
 static void gd_switch(DisplayChangeListener *dcl,
Signature · 1 line
1.8.0
#1 lore raw
Quoted 14 lines · Anthony Liguori

It's not a GObject.

---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ui/gtk.c +0 -0
index 8dc9041..3bc2842 100644

ui/gtk.c static void gd_cursor_define(DisplayChangeListener *dcl, · line 380

Quoted 5 lines
ui/gtk.c +1 -1
@@ -377,7 +377,7 @@ static void gd_cursor_define(DisplayChangeListener *dcl,
                                         pixbuf, c->hot_x, c->hot_y);
     gdk_window_set_cursor(gtk_widget_get_window(s->drawing_area), cursor);
     g_object_unref(pixbuf);
-    g_object_unref(cursor);
+    gdk_cursor_unref(cursor);

Function name in subject doesn't match code change :-)

-- PMM

#2 lore raw
Quoted 10 lines · Peter Maydell
Quoted 9 lines · Anthony Liguori

It's not a GObject.

---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

ui/gtk.c static void gd_cursor_define(DisplayChangeListener *dcl, · line 380

Quoted 10 lines
ui/gtk.c +1 -1
index 8dc9041..3bc2842 100644
@@ -377,7 +377,7 @@ static void gd_cursor_define(DisplayChangeListener *dcl,
                                         pixbuf, c->hot_x, c->hot_y);
     gdk_window_set_cursor(gtk_widget_get_window(s->drawing_area), cursor);
     g_object_unref(pixbuf);
-    g_object_unref(cursor);
+    gdk_cursor_unref(cursor);

Function name in subject doesn't match code change :-)

Doh, ack.

Regards,

Anthony Liguori

Quoted 2 lines

-- PMM