From aab8f21475aac125970e144359110ef1628cc9f5 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Fri, 24 Dec 2004 19:40:09 +0000 Subject: [PATCH] Don't show menu if all options are invalid (fixes #148915) 2004-12-24 Elijah Newren * src/window.c (meta_window_show_menu): Don't show menu if all options are invalid (fixes #148915) --- ChangeLog | 5 +++++ src/window.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6ff2ef990..e68923e7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-24 Elijah Newren + + * src/window.c (meta_window_show_menu): Don't show menu if all + options are invalid (fixes #148915) + 2004-12-24 Elijah Newren * src/window.c (window_takes_focus_on_map): Fix error in diff --git a/src/window.c b/src/window.c index 3b6a089d9..cc44aab0c 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,