diff options
author | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2007-03-15 17:15:24 +0000 |
---|---|---|
committer | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2007-03-15 17:15:24 +0000 |
commit | 4927b4e5fc6051e475acdbd699bd0526a177f627 (patch) | |
tree | ca01495eeb670b592f51a2e1f1861cd3812a06a5 /packages/gtk+/gtk+-2.10.10/menu-deactivate.patch | |
parent | b753652b5eb4a8e697ff652b5bc9bb5eb38b495f (diff) | |
parent | 10c51fbb2fe9394445c658541db485fd5a83e7c1 (diff) |
merge of '286930242424d10b2503eb290dbc31c7975bab74'
and 'b7e38ccba43c893e20bc2db30dfbdd9a3f6c2053'
Diffstat (limited to 'packages/gtk+/gtk+-2.10.10/menu-deactivate.patch')
-rw-r--r-- | packages/gtk+/gtk+-2.10.10/menu-deactivate.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/packages/gtk+/gtk+-2.10.10/menu-deactivate.patch b/packages/gtk+/gtk+-2.10.10/menu-deactivate.patch new file mode 100644 index 0000000000..cfb8849e9f --- /dev/null +++ b/packages/gtk+/gtk+-2.10.10/menu-deactivate.patch @@ -0,0 +1,51 @@ +--- gtk+-2.10.0/gtk/gtkmenushell.c.orig 2006-07-05 17:17:34.000000000 +0200 ++++ gtk+-2.10.0/gtk/gtkmenushell.c 2006-07-05 17:19:01.000000000 +0200 +@@ -42,7 +42,7 @@ + #include "gtkintl.h" + #include "gtkalias.h" + +-#define MENU_SHELL_TIMEOUT 500 ++#define MENU_SHELL_TIMEOUT 2000 + + #define PACK_DIRECTION(m) \ + (GTK_IS_MENU_BAR (m) \ +@@ -203,6 +203,8 @@ + + G_DEFINE_TYPE (GtkMenuShell, gtk_menu_shell, GTK_TYPE_CONTAINER) + ++static int last_crossing_time; ++ + static void + gtk_menu_shell_class_init (GtkMenuShellClass *klass) + { +@@ -517,6 +519,7 @@ + gtk_grab_add (GTK_WIDGET (menu_shell)); + menu_shell->have_grab = TRUE; + menu_shell->active = TRUE; ++ last_crossing_time = 0; + } + } + +@@ -669,6 +672,13 @@ + menu_shell->activate_time = 0; + deactivate = FALSE; + } ++ ++ if (last_crossing_time != 0 ++ && ((event->time - last_crossing_time) < 500)) ++ { ++ last_crossing_time = 0; ++ deactivate = FALSE; ++ } + + if (deactivate) + { +@@ -716,6 +726,8 @@ + { + menu_item = gtk_get_event_widget ((GdkEvent*) event); + ++ last_crossing_time = event->time; ++ + if (!menu_item || + (GTK_IS_MENU_ITEM (menu_item) && + !_gtk_menu_item_is_selectable (menu_item))) |