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
This commit is contained in:
Cody Russell 2008-08-09 04:20:14 +00:00 committed by Cody Russell
parent 56710ee7d7
commit b2aaa9416d
3 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,10 @@
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.
2008-08-09 Sven Herzberg <sven@imendio.com>
Get the gdk+cairo test to pass distcheck, too

View File

@ -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);

View File

@ -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);