[gnome-shell] Fix cursor when dragging a window over its current workspace



commit 01097ac9545b8034ef08084bf10361d2db9079ab
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Feb 14 17:13:25 2011 -0500

    Fix cursor when dragging a window over its current workspace
    
    When we are dragging a window over its current workspace or workspace
    thumbnail, we show show "no drop possible" feedback instead
    of "move here" feedback.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642329

 js/ui/workspace.js          |    2 +-
 js/ui/workspaceThumbnail.js |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 83bd914..074ba5a 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1297,7 +1297,7 @@ Workspace.prototype = {
 
     // Draggable target interface
     handleDragOver : function(source, actor, x, y, time) {
-        if (source instanceof WindowClone)
+        if (source.realWindow && !this._isMyWindow(source.realWindow))
             return DND.DragMotionResult.MOVE_DROP;
         if (source.shellWorkspaceLaunch)
             return DND.DragMotionResult.COPY_DROP;
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index ab9ea90..06dec6f 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -343,7 +343,7 @@ WorkspaceThumbnail.prototype = {
         if (this.state > ThumbnailState.NORMAL)
             return DND.DragMotionResult.CONTINUE;
 
-        if (source.realWindow)
+        if (source.realWindow && !this._isMyWindow(source.realWindow))
             return DND.DragMotionResult.MOVE_DROP;
         if (source.shellWorkspaceLaunch)
             return DND.DragMotionResult.COPY_DROP;



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