From 9f366118f070b53093feaf41bbd22ed83168d2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 23 May 2014 18:38:23 +0200 Subject: [PATCH] windowMenu: Only add workspace actions when enabled by session mode When workspaces are disabled by the session mode, all workspace related actions don't make sense. Worse, the "Move to Workspace ..." actions allow sending windows into a nirvana with no means to get them back. https://bugzilla.gnome.org/show_bug.cgi?id=730653 --- js/ui/windowMenu.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js index 395ccfe73..cca5504a4 100644 --- a/js/ui/windowMenu.js +++ b/js/ui/windowMenu.js @@ -81,7 +81,9 @@ const WindowMenu = new Lang.Class({ type == Meta.WindowType.SPLASHSCREEN) item.setSensitive(false); - if (!Meta.prefs_get_workspaces_only_on_primary() || window.is_on_primary_monitor()) { + if (Main.sessionMode.hasWorkspaces && + (!Meta.prefs_get_workspaces_only_on_primary() || + window.is_on_primary_monitor())) { let isSticky = window.is_on_all_workspaces(); item = this.addAction(_("Always on Visible Workspace"), Lang.bind(this, function() {