[gtk+/xi2: 147/148] GtkNotebook: Use device grabs.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2: 147/148] GtkNotebook: Use device grabs.
- Date: Thu, 10 Dec 2009 21:14:03 +0000 (UTC)
commit 0d6bd0aceff5a5c300225cd557c8c54516536df4
Author: Carlos Garnacho <carlos gnome org>
Date: Wed Dec 9 23:38:39 2009 +0100
GtkNotebook: Use device grabs.
gtk/gtknotebook.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 73afbc1..8aba08e 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2834,7 +2834,8 @@ get_drop_position (GtkNotebook *notebook,
static void
show_drag_window (GtkNotebook *notebook,
GtkNotebookPrivate *priv,
- GtkNotebookPage *page)
+ GtkNotebookPage *page,
+ GdkDevice *device)
{
GtkWidget *widget = GTK_WIDGET (notebook);
@@ -2869,10 +2870,10 @@ show_drag_window (GtkNotebook *notebook,
gdk_window_show (priv->drag_window);
/* the grab will dissapear when the window is hidden */
- gdk_pointer_grab (priv->drag_window,
- FALSE,
- GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
- NULL, NULL, GDK_CURRENT_TIME);
+ gdk_device_grab (device, priv->drag_window,
+ GDK_OWNERSHIP_WINDOW, FALSE,
+ GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
+ NULL, GDK_CURRENT_TIME);
}
/* This function undoes the reparenting that happens both when drag_window
@@ -3212,7 +3213,7 @@ gtk_notebook_motion_notify (GtkWidget *widget,
if (priv->operation != DRAG_OPERATION_REORDER)
{
priv->operation = DRAG_OPERATION_REORDER;
- show_drag_window (notebook, priv, page);
+ show_drag_window (notebook, priv, page, event->device);
}
gtk_notebook_pages_allocate (notebook);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]