Skip to contentSkip to conversation

gtk: don't use g_object_unref on GdkCursor

PATCH Applied Anthony Liguori 4 participants 7 messages Jun 3, 2013 – Jul 22, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gtk: don't use g_object_unref on GdkCursor

It's not a GObject.

---
v1 -> v2
- Fix summary to agree with code (Peter)

---
 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
Reviewed-by on v2 1/1
#1 lore raw

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

Quoted 2 lines · Anthony Liguori
ui/gtk.c +1 -1
-    g_object_unref(cursor);
+    gdk_cursor_unref(cursor);

cheers,
Gerd

#2 lore raw
In reply to Anthony Liguori

Am 03.06.2013 23:14, schrieb Anthony Liguori:

Quoted 11 lines

It's not a GObject.

---
v1 -> v2
- Fix summary to agree with code (Peter)

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

Seems this was accidentally cherry-picked rather than git-am'ed. ;)

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#3 lore raw
Quoted 13 lines · Andreas Färber

Am 03.06.2013 23:14, schrieb Anthony Liguori:

Quoted 11 lines

It's not a GObject.

---
v1 -> v2
- Fix summary to agree with code (Peter)

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

Seems this was accidentally cherry-picked rather than git-am'ed. ;)

Sort of, but yes.

Regards,

Anthony Liguori

Quoted 6 lines

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#5 lore raw
In reply to Anthony Liguori
Quoted 18 lines
Quoted 1 line
Quoted 1 line · Anthony Liguori

It's not a GObject.

---
v1 -> v2
- Fix summary to agree with code (Peter)

---
 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 383

Quoted 8 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);
 }
 
 static void gd_switch(DisplayChangeListener *dcl,

This is a candidate for the 1.5.2 stable release.

Bruce

#6 lore raw
In reply to Anthony Liguori
Quoted 18 lines
Quoted 1 line
Quoted 1 line · Anthony Liguori

It's not a GObject.

---
v1 -> v2
- Fix summary to agree with code (Peter)

---
 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 383

Quoted 8 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);
 }
 
 static void gd_switch(DisplayChangeListener *dcl,

This is a candidate for the 1.5.2 stable release.

Bruce