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
This commit is contained in:
Jasper St. Pierre 2012-09-22 19:57:57 -03:00
parent e6fd2bed4d
commit 4f359e62df

View File

@ -620,9 +620,7 @@ const ThumbnailsBox = new Lang.Class({
if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler) if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler)
return DND.DragMotionResult.CONTINUE; return DND.DragMotionResult.CONTINUE;
if (!Meta.prefs_get_dynamic_workspaces()) let canCreateWorkspaces = Meta.prefs_get_dynamic_workspaces();
return DND.DragMotionResult.CONTINUE;
let spacing = this.actor.get_theme_node().get_length('spacing'); let spacing = this.actor.get_theme_node().get_length('spacing');
this._dropWorkspace = -1; this._dropWorkspace = -1;
@ -647,7 +645,7 @@ const ThumbnailsBox = new Lang.Class({
if (i == this._dropPlaceholderPos) if (i == this._dropPlaceholderPos)
targetBottom += this._dropPlaceholder.get_height(); targetBottom += this._dropPlaceholder.get_height();
if (y > targetTop && y <= targetBottom && source != Main.xdndHandler) { if (y > targetTop && y <= targetBottom && source != Main.xdndHandler && canCreateWorkspaces) {
placeholderPos = i; placeholderPos = i;
break; break;
} else if (y > targetBottom && y <= nextTargetTop) { } else if (y > targetBottom && y <= nextTargetTop) {