[gtk+/wip/garnacho/gdkseat: 61/74] GtkNotebook: Use gdk_seat_grab()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/garnacho/gdkseat: 61/74] GtkNotebook: Use gdk_seat_grab()
- Date: Mon, 14 Dec 2015 20:07:46 +0000 (UTC)
commit 52e8694a8909293753c98cf4ccd168b3c4b1de26
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Nov 26 19:56:25 2015 +0100
GtkNotebook: Use gdk_seat_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=759309
gtk/gtknotebook.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index bb50c0b..6dddcb8 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -3122,6 +3122,14 @@ get_drop_position (GtkNotebook *notebook)
}
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,
GtkNotebookPage *page,
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]