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)
This commit is contained in:
Elijah Newren 2004-12-24 19:40:09 +00:00 committed by Elijah Newren
parent ce8c2d9463
commit aab8f21475
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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,