[gnome-shell] workspaceThumbnail: Fix the dynamic workspaces check for dragging



commit 4f359e62dfe812126cd5f7c9d6827a79a0b9894f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Sep 22 19:57:57 2012 -0300

    workspaceThumbnail: Fix the dynamic workspaces check for dragging
    
    Be able to move windows between workspaces with static workspaces
    enabled; the incorrect check here simply disabled all dragging
    operations.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684641

 js/ui/workspaceThumbnail.js |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index ab2e7ad..d0bc3e8 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -620,9 +620,7 @@ const ThumbnailsBox = new Lang.Class({
         if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler)
             return DND.DragMotionResult.CONTINUE;
 
-        if (!Meta.prefs_get_dynamic_workspaces())
-            return DND.DragMotionResult.CONTINUE;
-
+        let canCreateWorkspaces = Meta.prefs_get_dynamic_workspaces();
         let spacing = this.actor.get_theme_node().get_length('spacing');
 
         this._dropWorkspace = -1;
@@ -647,7 +645,7 @@ const ThumbnailsBox = new Lang.Class({
             if (i == this._dropPlaceholderPos)
                 targetBottom += this._dropPlaceholder.get_height();
 
-            if (y > targetTop && y <= targetBottom && source != Main.xdndHandler) {
+            if (y > targetTop && y <= targetBottom && source != Main.xdndHandler && canCreateWorkspaces) {
                 placeholderPos = i;
                 break;
             } else if (y > targetBottom && y <= nextTargetTop) {



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