forked from AuroraMiddleware/gtk
Bug 132502
Sat Feb 21 19:18:26 2004 Soeren Sandmann <sandmann@daimi.au.dk> Bug 132502 * gtk/gtkmenu.c (gtk_menu_motion_notify): Make sure we pop down if we enter a non-selectable menu item. * gtk/gtkmenu.c (gtk_menu_leave_notify): Don't pop a submenu when the user has left the item.
This commit is contained in:
parent
e5b5c4cda4
commit
d49a0c52bc
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
Sat Feb 21 19:18:26 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug 132502
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify): Make sure we pop down
|
||||
if we enter a non-selectable menu item.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Don't pop a submenu
|
||||
when the user has left the item.
|
||||
|
||||
Sat Feb 21 17:57:35 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/docs: Commit auto-generated changes
|
||||
|
@ -1,3 +1,13 @@
|
||||
Sat Feb 21 19:18:26 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug 132502
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify): Make sure we pop down
|
||||
if we enter a non-selectable menu item.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Don't pop a submenu
|
||||
when the user has left the item.
|
||||
|
||||
Sat Feb 21 17:57:35 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/docs: Commit auto-generated changes
|
||||
|
@ -1,3 +1,13 @@
|
||||
Sat Feb 21 19:18:26 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug 132502
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify): Make sure we pop down
|
||||
if we enter a non-selectable menu item.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Don't pop a submenu
|
||||
when the user has left the item.
|
||||
|
||||
Sat Feb 21 17:57:35 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/docs: Commit auto-generated changes
|
||||
|
@ -1,3 +1,13 @@
|
||||
Sat Feb 21 19:18:26 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug 132502
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify): Make sure we pop down
|
||||
if we enter a non-selectable menu item.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Don't pop a submenu
|
||||
when the user has left the item.
|
||||
|
||||
Sat Feb 21 17:57:35 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/docs: Commit auto-generated changes
|
||||
|
@ -1,3 +1,13 @@
|
||||
Sat Feb 21 19:18:26 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Bug 132502
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_motion_notify): Make sure we pop down
|
||||
if we enter a non-selectable menu item.
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Don't pop a submenu
|
||||
when the user has left the item.
|
||||
|
||||
Sat Feb 21 17:57:35 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/docs: Commit auto-generated changes
|
||||
|
@ -2609,7 +2609,6 @@ gtk_menu_motion_notify (GtkWidget *widget,
|
||||
*/
|
||||
menu_item = gtk_get_event_widget ((GdkEvent*) event);
|
||||
if (!menu_item || !GTK_IS_MENU_ITEM (menu_item) ||
|
||||
!_gtk_menu_item_is_selectable (menu_item) ||
|
||||
!GTK_IS_MENU (menu_item->parent))
|
||||
return FALSE;
|
||||
|
||||
@ -2623,6 +2622,15 @@ gtk_menu_motion_notify (GtkWidget *widget,
|
||||
if (gtk_menu_navigating_submenu (menu, event->x_root, event->y_root))
|
||||
return TRUE;
|
||||
|
||||
/* Make sure we pop down if we enter a non-selectable menu item, so we
|
||||
* don't show a submenu when the cursor is outside the stay-up triangle.
|
||||
*/
|
||||
if (!_gtk_menu_item_is_selectable (menu_item))
|
||||
{
|
||||
gtk_menu_shell_deselect (menu_shell);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (need_enter)
|
||||
{
|
||||
/* The menu is now sensitive to enter events on its items, but
|
||||
@ -2872,6 +2880,15 @@ gtk_menu_leave_notify (GtkWidget *widget,
|
||||
gtk_menu_set_submenu_navigation_region (menu, menu_item, event);
|
||||
return TRUE;
|
||||
}
|
||||
else if (menu_item == menu_shell->active_menu_item)
|
||||
{
|
||||
/* We are leaving an active menu item with nonactive submenu.
|
||||
* Deselect it so we don't surprise the user with by popping
|
||||
* up a submenu _after_ he left the item.
|
||||
*/
|
||||
gtk_menu_shell_deselect (menu_shell);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return GTK_WIDGET_CLASS (parent_class)->leave_notify_event (widget, event);
|
||||
|
Loading…
Reference in New Issue
Block a user