diff mbox

gtk: don't use g_object_ref on GdkCursor

Message ID 1370291992-29510-1-git-send-email-aliguori@us.ibm.com
State New
Headers show

Commit Message

Anthony Liguori June 3, 2013, 8:39 p.m. UTC
It's not a GObject.

Cc: Gerd Hoffman <kraxel@redhat.com>
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell June 3, 2013, 8:50 p.m. UTC | #1
On 3 June 2013 21:39, Anthony Liguori <aliguori@us.ibm.com> wrote:
> It's not a GObject.
>
> Cc: Gerd Hoffman <kraxel@redhat.com>
> Reported-by: Michael Tokarev <mjt@tls.msk.ru>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> ---
>  ui/gtk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 8dc9041..3bc2842 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -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
Anthony Liguori June 3, 2013, 9:10 p.m. UTC | #2
Peter Maydell <peter.maydell@linaro.org> writes:

> On 3 June 2013 21:39, Anthony Liguori <aliguori@us.ibm.com> wrote:
>> It's not a GObject.
>>
>> Cc: Gerd Hoffman <kraxel@redhat.com>
>> Reported-by: Michael Tokarev <mjt@tls.msk.ru>
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>> ---
>>  ui/gtk.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ui/gtk.c b/ui/gtk.c
>> index 8dc9041..3bc2842 100644
>> --- a/ui/gtk.c
>> +++ b/ui/gtk.c
>> @@ -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

>
> -- PMM
diff mbox

Patch

diff --git a/ui/gtk.c b/ui/gtk.c
index 8dc9041..3bc2842 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -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,