diff options
author | Rob Bradford <rob@linux.intel.com> | 2012-02-27 12:35:25 +0000 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2012-02-29 12:18:30 +0000 |
commit | 7cc3eb04ec5c77f01f25f21ef88723e00a96620e (patch) | |
tree | 66234416f44105a3dd77be9b0b0697e299a44937 /gtk/gtkmenushell.c | |
parent | 5badf835e9390706042693eb0bf0f6bc31f7d20a (diff) | |
download | gtk+-7cc3eb04ec5c77f01f25f21ef88723e00a96620e.tar.gz |
menu: Deactivate the menu if the GdkWindow is withdrawn
If the display server or GDK hides the window - fire the "deactivate" signal
to ensure that the internal state is consistent.
This patch also ensures that the "deactivate" signal will not be fired for a
menu that is not active.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=670881
Diffstat (limited to 'gtk/gtkmenushell.c')
-rw-r--r-- | gtk/gtkmenushell.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index da7c8caa45..b74f424e93 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -612,7 +612,8 @@ gtk_menu_shell_deactivate (GtkMenuShell *menu_shell) { g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell)); - g_signal_emit (menu_shell, menu_shell_signals[DEACTIVATE], 0); + if (menu_shell->priv->active) + g_signal_emit (menu_shell, menu_shell_signals[DEACTIVATE], 0); } static void |