diff options
author | Cody Russell <bratsche@gnome.org> | 2008-08-09 04:20:14 +0000 |
---|---|---|
committer | Cody Russell <bratsche@src.gnome.org> | 2008-08-09 04:20:14 +0000 |
commit | b2aaa9416d958743934f2ec421a11b222db5b1b8 (patch) | |
tree | e3f8c1f139aa5024f3f2e1851c4280b57ab272df /gtk | |
parent | 56710ee7d7a1877d0d19fef8f3b4697bd3ea5e83 (diff) | |
download | gtk+-b2aaa9416d958743934f2ec421a11b222db5b1b8.tar.gz |
gtk/gtkmenushell.c In enter/leave notify events, check that the crossing
2008-08-08 Cody Russell <bratsche@gnome.org>
* gtk/gtkmenushell.c
* gtk/gtkmenu.c: In enter/leave notify events, check that the crossing
mode is not GTK_GRAB, GTK_UNGRAB, or STATE_CHANGED. Fixes regressions
in menus caused by bug #56070.
svn path=/trunk/; revision=21049
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkmenu.c | 10 | ||||
-rw-r--r-- | gtk/gtkmenushell.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index d8c2e33d95..f3fab0571c 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -3623,6 +3623,11 @@ gtk_menu_enter_notify (GtkWidget *widget, GtkWidget *menu_item; gboolean touchscreen_mode; + if (event->mode == GDK_CROSSING_GTK_GRAB || + event->mode == GDK_CROSSING_GTK_UNGRAB || + event->mode == GDK_CROSSING_STATE_CHANGED) + return TRUE; + g_object_get (gtk_widget_get_settings (widget), "gtk-touchscreen-mode", &touchscreen_mode, NULL); @@ -3694,6 +3699,11 @@ gtk_menu_leave_notify (GtkWidget *widget, GtkMenuItem *menu_item; GtkWidget *event_widget; + if (event->mode == GDK_CROSSING_GTK_GRAB || + event->mode == GDK_CROSSING_GTK_UNGRAB || + event->mode == GDK_CROSSING_STATE_CHANGED) + return TRUE; + menu = GTK_MENU (widget); menu_shell = GTK_MENU_SHELL (widget); diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index f2ca2dcdf0..79a250b341 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -802,6 +802,11 @@ gtk_menu_shell_enter_notify (GtkWidget *widget, { GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget); + if (event->mode == GDK_CROSSING_GTK_GRAB || + event->mode == GDK_CROSSING_GTK_UNGRAB || + event->mode == GDK_CROSSING_STATE_CHANGED) + return TRUE; + if (menu_shell->active) { GtkWidget *menu_item; @@ -867,6 +872,11 @@ static gint gtk_menu_shell_leave_notify (GtkWidget *widget, GdkEventCrossing *event) { + if (event->mode == GDK_CROSSING_GTK_GRAB || + event->mode == GDK_CROSSING_GTK_GRAB || + event->mode == GDK_CROSSING_STATE_CHANGED) + return TRUE; + if (GTK_WIDGET_VISIBLE (widget)) { GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget); |