GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit ceebc5e9 authored by Soeren Sandmann's avatar Soeren Sandmann Committed by Søren Sandmann Pedersen

Revert previous commit. It caused the problem of sticky right click menus

Thu Jun  3 08:07:59 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c: Revert previous commit. It caused the problem
	of sticky right click menus to return.
parent 64bb108e
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
of sticky right click menus to return.
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
......
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
of sticky right click menus to return.
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
......
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
of sticky right click menus to return.
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
......
Thu Jun 3 08:07:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Revert previous commit. It caused the problem
of sticky right click menus to return.
Wed Jun 2 01:56:02 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: Fix the stay up algorithm for combo boxes to
......
......@@ -73,16 +73,10 @@ struct _GtkMenuAttachData
GtkMenuDetachFunc detacher;
};
typedef enum {
NONE,
SEEN_MOTION,
SEEN_MOTION_ENTER,
SEEN_MOTION_ENTER_MOTION
} SelectState;
struct _GtkMenuPrivate
{
SelectState select_state;
gboolean seen_enter;
gboolean seen_motion;
gboolean have_position;
gint x;
gint y;
......@@ -1285,7 +1279,8 @@ gtk_menu_popup (GtkMenu *menu,
menu_shell->parent_menu_shell = parent_menu_shell;
priv->select_state = NONE;
priv->seen_enter = FALSE;
priv->seen_motion = FALSE;
/* Find the last viewable ancestor, and make an X grab on it
*/
......@@ -2733,17 +2728,11 @@ gtk_menu_motion_notify (GtkWidget *widget,
gtk_menu_handle_scrolling (GTK_MENU (widget), TRUE);
if (priv->select_state == NONE)
{
priv->select_state = SEEN_MOTION;
}
else if (priv->select_state == SEEN_MOTION_ENTER)
priv->seen_motion = TRUE;
if (priv->seen_enter)
{
priv->select_state = SEEN_MOTION_ENTER_MOTION;
/* After having seen both a motion, an enter, and a motion
* in that order, button releases should be interpreted
* as "activate".
/* After having seen both a motion and an enter,
* button releases should be interpreted as "activate".
*/
GTK_MENU_SHELL (widget)->activate_time = 0;
......@@ -2985,8 +2974,15 @@ gtk_menu_enter_notify (GtkWidget *widget,
if (!menu_shell->ignore_enter)
gtk_menu_handle_scrolling (GTK_MENU (widget), TRUE);
if (priv->select_state == SEEN_MOTION)
priv->select_state = SEEN_MOTION_ENTER;
priv->seen_enter = TRUE;
if (priv->seen_motion)
{
/* After having seen both a motion and an enter,
* button releases should be interpreted as "activate".
*/
GTK_MENU_SHELL (widget)->activate_time = 0;
}
}
/* If this is a faked enter (see gtk_menu_motion_notify), 'widget'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment