summaryrefslogtreecommitdiff
path: root/gtk/gtkmenushell.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2000-03-14 19:57:25 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-03-14 19:57:25 +0000
commit10ba4fd066042b4335ae45e7560565872f71ba9b (patch)
tree17f68ffb0d402b6e66bb891d4a7d9a02a9b6108b /gtk/gtkmenushell.c
parent3f98a849c70ae570b78095cef0152a33ec07c64e (diff)
downloadgdk-pixbuf-10ba4fd066042b4335ae45e7560565872f71ba9b.tar.gz
Merges from gtk-1-2
Diffstat (limited to 'gtk/gtkmenushell.c')
-rw-r--r--gtk/gtkmenushell.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 0fe6c6b12..784a89fe8 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -494,7 +494,17 @@ gtk_menu_shell_button_release (GtkWidget *widget,
}
}
else
- deactivate = FALSE;
+ {
+ /* We only ever want to prevent deactivation on the first
+ * press/release. Setting the time to zero is a bit of a
+ * hack, since we could be being triggered in the first
+ * few fractions of a second after a server time wraparound.
+ * the chances of that happening are ~1/10^6, without
+ * serious harm if we lose.
+ */
+ menu_shell->activate_time = 0;
+ deactivate = FALSE;
+ }
/* If the button click was very fast, or we ended up on a submenu,
* leave the menu up