[gtk+/xi2] GtkMenu: Also set grab devices to the object with the X grab.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2] GtkMenu: Also set grab devices to the object with the X grab.
- Date: Wed, 30 Dec 2009 21:18:07 +0000 (UTC)
commit 4cdbdb3930a5d3e00f7c7593388bd36652940bf7
Author: Carlos Garnacho <carlos gnome org>
Date: Thu Dec 24 14:08:44 2009 +0100
GtkMenu: Also set grab devices to the object with the X grab.
This is needed for knowing which devices should be ungrabbed later.
gtk/gtkmenu.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index c69d7c4..3ef9061 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1524,7 +1524,10 @@ gtk_menu_popup_for_device (GtkMenu *menu,
if (xgrab_shell && xgrab_shell != widget)
{
if (popup_grab_on_window (xgrab_shell->window, keyboard, pointer, activate_time))
- GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE;
+ {
+ _gtk_menu_shell_set_grab_devices (GTK_MENU_SHELL (xgrab_shell), keyboard, pointer);
+ GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE;
+ }
}
else
{
@@ -1533,7 +1536,10 @@ gtk_menu_popup_for_device (GtkMenu *menu,
xgrab_shell = widget;
transfer_window = menu_grab_transfer_window_get (menu);
if (popup_grab_on_window (transfer_window, keyboard, pointer, activate_time))
- GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE;
+ {
+ _gtk_menu_shell_set_grab_devices (GTK_MENU_SHELL (xgrab_shell), keyboard, pointer);
+ GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE;
+ }
}
if (!GTK_MENU_SHELL (xgrab_shell)->have_xgrab)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]