diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index bb50c0bab1..6dddcb8f1e 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3121,6 +3121,14 @@ get_drop_position (GtkNotebook *notebook) return last_child; } +static void +prepare_drag_window (GdkSeat *seat, + GdkWindow *window, + gpointer user_data) +{ + gdk_window_show (window); +} + static void show_drag_window (GtkNotebook *notebook, GtkNotebookPrivate *priv, @@ -3158,13 +3166,10 @@ show_drag_window (GtkNotebook *notebook, gtk_widget_set_parent (page->tab_label, widget); g_object_unref (page->tab_label); - gdk_window_show (priv->drag_window); - /* the grab will dissapear when the window is hidden */ - gdk_device_grab (device, priv->drag_window, - GDK_OWNERSHIP_WINDOW, FALSE, - GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - NULL, GDK_CURRENT_TIME); + gdk_seat_grab (gdk_device_get_seat (device), priv->drag_window, + GDK_SEAT_CAPABILITY_ALL, FALSE, + NULL, NULL, prepare_drag_window, notebook); } /* This function undoes the reparenting that happens both when drag_window