[nautilus] dnd: use GdkSeat operations



commit 98dce7d56e84af291ade0a5028694cddb99e8a38
Author: Ernestas Kulik <ernestas kulik gmail com>
Date:   Sun Apr 17 20:20:37 2016 +0300

    dnd: use GdkSeat operations
    
    Some GdkDisplay operations have been deprecated in GDK 3.20.
    
    This commit replaces the deprecated code with new GdkSeat
    operations.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762235

 libnautilus-private/nautilus-dnd.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index db3e905..8970926 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -824,14 +824,16 @@ void
 nautilus_drag_autoscroll_calculate_delta (GtkWidget *widget, float *x_scroll_delta, float *y_scroll_delta)
 {
        GtkAllocation allocation;
-       GdkDeviceManager *manager;
+       GdkDisplay *display;
+       GdkSeat *seat;
        GdkDevice *pointer;
        int x, y;
 
        g_assert (GTK_IS_WIDGET (widget));
 
-       manager = gdk_display_get_device_manager (gtk_widget_get_display (widget));
-       pointer = gdk_device_manager_get_client_pointer (manager);
+       display = gtk_widget_get_display (widget);
+       seat = gdk_display_get_default_seat (display);
+       pointer = gdk_seat_get_pointer (seat);
        gdk_window_get_device_position (gtk_widget_get_window (widget), pointer,
                                        &x, &y, NULL);
 


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