forked from AuroraMiddleware/gtk
Remove usage of menu_shell->ignore leave which was to deal with stray
Wed Aug 13 17:01:49 2003 Owen Taylor <otaylor@redhat.com> * gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify): Remove usage of menu_shell->ignore leave which was to deal with stray events we no longer get because we do grabbing differently. Comment it as unused in the header. (#115837, Keith Bissett)
This commit is contained in:
parent
91d3768017
commit
a649119906
@ -1,3 +1,11 @@
|
||||
Wed Aug 13 17:01:49 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify):
|
||||
Remove usage of menu_shell->ignore leave which was
|
||||
to deal with stray events we no longer get because
|
||||
we do grabbing differently. Comment it as unused in
|
||||
the header. (#115837, Keith Bissett)
|
||||
|
||||
Wed Aug 13 16:32:43 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Aug 13 17:01:49 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify):
|
||||
Remove usage of menu_shell->ignore leave which was
|
||||
to deal with stray events we no longer get because
|
||||
we do grabbing differently. Comment it as unused in
|
||||
the header. (#115837, Keith Bissett)
|
||||
|
||||
Wed Aug 13 16:32:43 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Aug 13 17:01:49 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify):
|
||||
Remove usage of menu_shell->ignore leave which was
|
||||
to deal with stray events we no longer get because
|
||||
we do grabbing differently. Comment it as unused in
|
||||
the header. (#115837, Keith Bissett)
|
||||
|
||||
Wed Aug 13 16:32:43 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Aug 13 17:01:49 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify):
|
||||
Remove usage of menu_shell->ignore leave which was
|
||||
to deal with stray events we no longer get because
|
||||
we do grabbing differently. Comment it as unused in
|
||||
the header. (#115837, Keith Bissett)
|
||||
|
||||
Wed Aug 13 16:32:43 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Aug 13 17:01:49 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify):
|
||||
Remove usage of menu_shell->ignore leave which was
|
||||
to deal with stray events we no longer get because
|
||||
we do grabbing differently. Comment it as unused in
|
||||
the header. (#115837, Keith Bissett)
|
||||
|
||||
Wed Aug 13 16:32:43 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
|
||||
|
@ -323,7 +323,6 @@ gtk_menu_shell_init (GtkMenuShell *menu_shell)
|
||||
menu_shell->active = FALSE;
|
||||
menu_shell->have_grab = FALSE;
|
||||
menu_shell->have_xgrab = FALSE;
|
||||
menu_shell->ignore_leave = FALSE;
|
||||
menu_shell->button = 0;
|
||||
menu_shell->menu_flag = 0;
|
||||
menu_shell->activate_time = 0;
|
||||
@ -537,8 +536,13 @@ gtk_menu_shell_button_release (GtkWidget *widget,
|
||||
gtk_widget_event (menu_shell->parent_menu_shell, (GdkEvent*) event);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* If we ended up on an item with a submenu, leave the menu up.
|
||||
*/
|
||||
if (menu_item && (menu_shell->active_menu_item == menu_item))
|
||||
deactivate = FALSE;
|
||||
}
|
||||
else
|
||||
else /* a very fast press-release */
|
||||
{
|
||||
/* We only ever want to prevent deactivation on the first
|
||||
* press/release. Setting the time to zero is a bit of a
|
||||
@ -551,18 +555,6 @@ gtk_menu_shell_button_release (GtkWidget *widget,
|
||||
deactivate = FALSE;
|
||||
}
|
||||
|
||||
/* If the button click was very fast, or we ended up on a submenu,
|
||||
* leave the menu up
|
||||
*/
|
||||
if (!deactivate ||
|
||||
(menu_item && (menu_shell->active_menu_item == menu_item)))
|
||||
{
|
||||
deactivate = FALSE;
|
||||
menu_shell->ignore_leave = TRUE;
|
||||
}
|
||||
else
|
||||
deactivate = TRUE;
|
||||
|
||||
if (deactivate)
|
||||
{
|
||||
gtk_menu_shell_deactivate (menu_shell);
|
||||
@ -663,12 +655,6 @@ gtk_menu_shell_leave_notify (GtkWidget *widget,
|
||||
|
||||
menu_item = GTK_MENU_ITEM (event_widget);
|
||||
|
||||
if (menu_shell->ignore_leave)
|
||||
{
|
||||
menu_shell->ignore_leave = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!_gtk_menu_item_is_selectable (event_widget))
|
||||
return TRUE;
|
||||
|
||||
|
@ -62,7 +62,7 @@ struct _GtkMenuShell
|
||||
guint active : 1;
|
||||
guint have_grab : 1;
|
||||
guint have_xgrab : 1;
|
||||
guint ignore_leave : 1;
|
||||
guint ignore_leave : 1; /* unused */
|
||||
guint menu_flag : 1;
|
||||
guint ignore_enter : 1;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user