After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591158 - workspaces: Create drag actor for clone rather than using actor itself
workspaces: Create drag actor for clone rather than using actor itself
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 591157 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-08 15:44 UTC by Colin Walters
Modified: 2015-02-27 01:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
workspaces: Create drag actor for clone rather than using actor itself (1.52 KB, patch)
2009-08-08 15:45 UTC, Colin Walters
none Details | Review
dnd: If drop accepted without taking actor, do snapback (2.80 KB, patch)
2009-08-08 18:15 UTC, Colin Walters
needs-work Details | Review
workspaces: Make actor partially transparent on drag (1.05 KB, patch)
2009-08-08 18:15 UTC, Colin Walters
rejected Details | Review

Description Colin Walters 2009-08-08 15:44:47 UTC
This avoid some apparent problems with drag and drop; we really
want to use a representation of the actor rather than the actor
itself.
Comment 1 Colin Walters 2009-08-08 15:45:32 UTC
Created attachment 140209 [details] [review]
workspaces: Create drag actor for clone rather than using actor itself
Comment 2 Colin Walters 2009-08-08 15:55:02 UTC
*** Bug 591157 has been marked as a duplicate of this bug. ***
Comment 3 Owen Taylor 2009-08-08 16:45:30 UTC
Replying to a comment from bug 588474
(In reply to comment #24)
> (In reply to comment #16)
> 
> > (mutter:15604): Clutter-WARNING **: Actor of type ClutterClone is not inside a
> > container
> 
> I think this is because when we accept a drop, dnd.js does:
> 
>                     // If it accepted the drop without taking the actor,
>                     // destroy it.
>                     if (actor.get_parent() == actor.get_stage())
>                         actor.destroy();
> 
> How exactly this should all work if you haven't created a specific drag clone
> I'm not sure, but I think it's better to create one anyways so that we can make
> it partially transparent, which lets you actually see where you're dropping it.
>  We should probably scale it down too.  That's in bug 591158.

Hmm, I guess when dragging to the window well, it's awkward to drop a big full window, but I think direct manipulation is more comfortable for moving things between workspaces and feels more natural. And that's the primary use case for dragging windows. If you wanted to created a launcher for the app, you are likely going to drag the icon from running apps, which is a lot closer and more "appy"

Look at how acceptDrop works for Workspace - that looks like it will break badly with this patch.

I think the right fix is do:

   if (actor.get_parent() == actor.get_stage()) {
       this._releaseDragActor();
   }

Where _releaseDragActor is the stuff at the beginning of _onSnapBackComplete() refactored out.
Comment 4 Colin Walters 2009-08-08 18:15:18 UTC
Created attachment 140222 [details] [review]
dnd: If drop accepted without taking actor, do snapback

The workspaces uses DnD in the mode where the dragged item is its
own drag representation.  Fix the case where a target accepts the
drop but does not take the actor by doing a snapback.
Comment 5 Colin Walters 2009-08-08 18:15:24 UTC
Created attachment 140223 [details] [review]
workspaces: Make actor partially transparent on drag

Useful to see where you're actually placing it, especially with
larger windows.
Comment 6 Owen Taylor 2009-08-08 18:28:28 UTC
(In reply to comment #4)
> Created an attachment (id=140222) [edit]
> dnd: If drop accepted without taking actor, do snapback
> 
> The workspaces uses DnD in the mode where the dragged item is its
> own drag representation.  Fix the case where a target accepts the
> drop but does not take the actor by doing a snapback.

I don't think this is right - snapback is an indication that the drag failed.
Comment 7 Colin Walters 2009-08-08 18:54:07 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > Created an attachment (id=140222) [edit]
> > dnd: If drop accepted without taking actor, do snapback
> > 
> > The workspaces uses DnD in the mode where the dragged item is its
> > own drag representation.  Fix the case where a target accepts the
> > drop but does not take the actor by doing a snapback.
> 
> I don't think this is right - snapback is an indication that the drag failed.

Fair enough...hm.  Maybe we add a way for the application well to tell DnD "I accepted the drop, here's the actor which represents the target".  So we could animate the window shrinking down into its launcher, or some effect like that.  Or other ideas welcome.



Comment 8 Owen Taylor 2009-08-10 11:14:24 UTC
For now I think it's fine if the window just reappears in its old position after release, but without the animated snapback.
Comment 9 Owen Taylor 2009-08-18 22:32:47 UTC
Comment on attachment 140223 [details] [review]
workspaces: Make actor partially transparent on drag

(In reply to comment #5)
> Created an attachment (id=140223) [details]
> workspaces: Make actor partially transparent on drag
> 
> Useful to see where you're actually placing it, especially with
> larger windows.

Trying this out in isolation it doesn't feel like much of an improvement to me. There's a bit of a "ooh shiny transparent" buzz, but it makes dragging windows between workspaces feel less solid and less like direct manipulation.

My best take on the right behavior:

 A) When you start dragging, you "pick up" the window and its fully opaque
 B) If you leave the workspace area (the bounds of the currently present workspaces plus maybe a few pixels slop), then the drag icon abruptly changes from the window to the app icon and the window fades back in at its original location to indicate that you aren't going to move the window.
 C) If you go back to the workspaces the drag icon change reverses and you go back to dragging the window (with the original "pick up" location)
 D) A failed drop snaps the icon back to the location of the window.

Optional bonus points:

 The window fades back out from the original workspace location when you are over the add-workspace (+)
Comment 10 Owen Taylor 2009-08-18 22:34:41 UTC
(In reply to comment #9)

> Trying this out in isolation it doesn't feel like much of an improvement to me.
> There's a bit of a "ooh shiny transparent" buzz, but it makes dragging windows
> between workspaces feel less solid and less like direct manipulation.

Forgot to add the other half of what I was going to say here:

And when you are dragging to the app well, you still feel like you are trying to cram a gigantic object into a little box - the fact that the point location is the hot spot isn't intuitive even when you know that is in fact in case.
Comment 11 Florian Müllner 2010-05-21 04:32:53 UTC
Close obsolete? Much of this has been reworked/tried while landing the window dragging in linear view stuff ...
Comment 12 Dan Winship 2010-05-25 13:23:17 UTC
i think owen's last comment about "cramming a gigantic object into a little box" is still relevant (other than the part where that's currently broken, but...)
Comment 13 Allan Day 2013-08-26 23:28:36 UTC
Old bug with no activity for over three years. Are we sure that we still need it?
Comment 14 Florian Müllner 2015-02-27 01:45:33 UTC
I don't think so - dragging windows to the dash as mentioned in comments #10 and #12 was removed quite a while ago by now ...