[gnome-shell] windowManager: Don't allow move-to-workspace for always-sticky windows



commit 14da6b68dc64f35907ea71214ee1e7c5dc148937
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Mar 25 23:35:36 2015 +0100

    windowManager: Don't allow move-to-workspace for always-sticky windows
    
    "Moving" a window to another workspace doesn't make sense when it cannot
    be unstuck, and is potentially confusing if a new workspace is added at
    the start/end - just don't do anything in that case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746782

 js/ui/windowManager.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index d04455b..bdde746 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1626,6 +1626,16 @@ const WindowManager = new Lang.Class({
         let newWs;
         let direction;
 
+        if (action == 'move') {
+            // "Moving" a window to another workspace doesn't make sense when
+            // it cannot be unstuck, and is potentially confusing if a new
+            // workspaces is added at the start/end
+            if (window.is_always_on_all_workspaces() ||
+                (Meta.prefs_get_workspaces_only_on_primary() &&
+                 window.get_monitor() != Main.layoutManager.primaryIndex))
+              return;
+        }
+
         if (target == 'last') {
             direction = Meta.MotionDirection.DOWN;
             newWs = screen.get_workspace_by_index(screen.n_workspaces - 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]