[maemo-commits] [maemo-commits] r15392 - in projects/haf/trunk/gtk+: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Apr 15 11:39:52 EEST 2008
Author: mitch
Date: 2008-04-15 11:39:50 +0300 (Tue, 15 Apr 2008)
New Revision: 15392

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gtk/gtkmenu.c
Log:
2008-04-15  Michael Natterer  <mitch at imendio.com>

	Fixes NB#80760: context sensitive menu disappears after stylus
	releasing:

	* gtk/gtkmenu.c (gtk_menu_button_release): use the same conditions
	as gtk_menu_motion_notify() for checking whether the context menu
	needs to be closed because the pointer has been moved too far out
	of the menu.



Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2008-04-14 14:57:44 UTC (rev 15391)
+++ projects/haf/trunk/gtk+/ChangeLog	2008-04-15 08:39:50 UTC (rev 15392)
@@ -1,3 +1,13 @@
+2008-04-15  Michael Natterer  <mitch at imendio.com>
+
+	Fixes NB#80760: context sensitive menu disappears after stylus
+	releasing:
+
+	* gtk/gtkmenu.c (gtk_menu_button_release): use the same conditions
+	as gtk_menu_motion_notify() for checking whether the context menu
+	needs to be closed because the pointer has been moved too far out
+	of the menu.
+
 2008-04-08  Michael Natterer  <mitch at imendio.com>
 
 	Fixes NB#77057: two submenus are closed in web plugin menu when

Modified: projects/haf/trunk/gtk+/gtk/gtkmenu.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtkmenu.c	2008-04-14 14:57:44 UTC (rev 15391)
+++ projects/haf/trunk/gtk+/gtk/gtkmenu.c	2008-04-15 08:39:50 UTC (rev 15392)
@@ -2923,6 +2923,9 @@
 			 GdkEventButton *event)
 {
   GtkMenuPrivate *priv = gtk_menu_get_private (GTK_MENU (widget));
+#ifdef MAEMO_CHANGES
+  GtkWidget *menu_item;
+#endif
 
   if (priv->ignore_button_release)
     {
@@ -2946,7 +2949,9 @@
       pointer_in_menu_window (widget, event->x_root, event->y_root))
     return TRUE;
 #else
-  if (GTK_IS_MENU_SHELL (gtk_get_event_widget ((GdkEvent *) event)))
+  menu_item = gtk_get_event_widget ((GdkEvent*) event);
+  if (!GTK_IS_MENU_ITEM (menu_item) ||
+      !GTK_IS_MENU (menu_item->parent))
     {
       if (priv->context_menu &&
           (priv->popup_pointer_x >= 0) &&


More information about the maemo-commits mailing list