summaryrefslogtreecommitdiff
path: root/gtk/gtkmenushell.c
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2012-02-27 12:35:25 +0000
committerRob Bradford <rob@linux.intel.com>2012-02-29 12:18:30 +0000
commit7cc3eb04ec5c77f01f25f21ef88723e00a96620e (patch)
tree66234416f44105a3dd77be9b0b0697e299a44937 /gtk/gtkmenushell.c
parent5badf835e9390706042693eb0bf0f6bc31f7d20a (diff)
downloadgtk+-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.c3
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