diff options
Diffstat (limited to 'gtk/gtkmenushell.c')
-rw-r--r-- | gtk/gtkmenushell.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index 0fe6c6b125..784a89fe80 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 |