Replace two instances of gdk_pointer_grab with gdk_device_grab
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Jun 2015 12:10:20 +0000 (14:10 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Jun 2015 12:10:20 +0000 (14:10 +0200)
src/ui/gui/pspp-sheet-view.c

index 641b77bd572e19d67950eaa37866b4b791d561c6..9de116ce9e3650c71a12a4273e666130cd947b14 100644 (file)
@@ -2564,11 +2564,14 @@ pspp_sheet_view_button_press (GtkWidget      *widget,
        {
          gpointer drag_data;
 
-         if (gdk_pointer_grab (column->window, FALSE,
-                               GDK_POINTER_MOTION_HINT_MASK |
-                               GDK_BUTTON1_MOTION_MASK |
-                               GDK_BUTTON_RELEASE_MASK,
-                               NULL, NULL, event->time))
+         if (GDK_GRAB_SUCCESS != gdk_device_grab (event->device,
+                                                  column->window,
+                                                  GDK_OWNERSHIP_NONE,
+                                                  FALSE,
+                                                  GDK_POINTER_MOTION_HINT_MASK |
+                                                  GDK_BUTTON1_MOTION_MASK |
+                                                  GDK_BUTTON_RELEASE_MASK,
+                                                  NULL, event->time))
            return FALSE;
 
          gtk_grab_add (widget);
@@ -2684,8 +2687,8 @@ pspp_sheet_view_button_release_column_resize (GtkWidget      *widget,
 
   PSPP_SHEET_VIEW_UNSET_FLAG (tree_view, PSPP_SHEET_VIEW_IN_COLUMN_RESIZE);
   gtk_grab_remove (widget);
-  gdk_display_pointer_ungrab (gdk_window_get_display (event->window),
-                             event->time);
+  gdk_device_ungrab (event->device, event->time);
+
   return TRUE;
 }