summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2004-12-24 19:40:09 +0000
committerElijah Newren <newren@src.gnome.org>2004-12-24 19:40:09 +0000
commitaab8f21475aac125970e144359110ef1628cc9f5 (patch)
treea3b83aa48d1f3dcbc69cbae849a94035f97bb50d
parentce8c2d9463183f9ddd6aaf6eb8506b75fce10283 (diff)
downloadmetacity-aab8f21475aac125970e144359110ef1628cc9f5.tar.gz
Don't show menu if all options are invalid (fixes #148915)
2004-12-24 Elijah Newren <newren@gmail.com> * src/window.c (meta_window_show_menu): Don't show menu if all options are invalid (fixes #148915)
-rw-r--r--ChangeLog5
-rw-r--r--src/window.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ff2ef99..e68923e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2004-12-24 Elijah Newren <newren@gmail.com>
+ * src/window.c (meta_window_show_menu): Don't show menu if all
+ options are invalid (fixes #148915)
+
+2004-12-24 Elijah Newren <newren@gmail.com>
+
* src/window.c (window_takes_focus_on_map): Fix error in
distinguishing < vs. <= introduced by the patch in #154598,
restructure code so that verbose log matches code better in order
diff --git a/src/window.c b/src/window.c
index 3b6a089d..cc44aab0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5902,6 +5902,12 @@ meta_window_show_menu (MetaWindow *window,
(window->type == META_WINDOW_DOCK) ||
(window->type == META_WINDOW_SPLASHSCREEN))
insensitive |= META_MENU_OP_ABOVE | META_MENU_OP_UNABOVE;
+
+ /* If all operations are disabled, just quit without showing the menu.
+ * This is the case, for example, with META_WINDOW_DESKTOP windows.
+ */
+ if ((ops & ~insensitive) == 0)
+ return;
menu =
meta_ui_window_menu_new (window->screen->ui,