[file-roller] window: use gdk_cursor_new_for_display()



commit b36dcb5817003f317dbddbc8870ae901c6e5a192
Author: Ernestas Kulik <ernestas kulik gmail com>
Date:   Sat Jun 11 16:38:16 2016 +0300

    window: use gdk_cursor_new_for_display()
    
    gdk_cursor_new() has been deprecated since GDK 3.16 and
    gdk_cursor_new_for_display() is now the recommended function. This
    commit replaces the deprecated call.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767534

 src/fr-window.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 3faf28b..bb31134 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -3887,12 +3887,16 @@ file_motion_notify_callback (GtkWidget *widget,
                                       NULL, NULL, NULL);
 
        if (window->priv->list_hover_path != NULL)
-               cursor = gdk_cursor_new (GDK_HAND2);
+               cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (window)),
+                                                    GDK_HAND2);
        else
                cursor = NULL;
 
        gdk_window_set_cursor (event->window, cursor);
 
+       if (cursor != NULL)
+               g_object_unref (cursor);
+
        /* only redraw if the hover row has changed */
        if (!(last_hover_path == NULL && window->priv->list_hover_path == NULL) &&
            (!(last_hover_path != NULL && window->priv->list_hover_path != NULL) ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]