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 635272 - dnd: when snapping back, deal with moved/rescaled parents
dnd: when snapping back, deal with moved/rescaled parents
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-19 15:27 UTC by Dan Winship
Modified: 2010-11-19 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dnd: when snapping back, deal with moved/rescaled parents (4.48 KB, patch)
2010-11-19 15:27 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2010-11-19 15:27:49 UTC
Previously, when snapping back a drag actor, we moved it back to its
original stage-relative position and scale. This worked fine if its
parent was still in the same place it was when the drag started, but
failed in cases like the linear workspace layout window drag-and-drop,
where dragging a window would "zoom out" its parent workspace, causing
the snapback to send it to the wrong place.

Fix this by instead snapping the actor back to "where the actor would
have been right now if it were still at its original scale and
position within its original parent actor" rather than "where it was
before the drag started"
Comment 1 Dan Winship 2010-11-19 15:27:51 UTC
Created attachment 174850 [details] [review]
dnd: when snapping back, deal with moved/rescaled parents
Comment 2 Owen Taylor 2010-11-19 16:26:49 UTC
Review of attachment 174850 [details] [review]:

Look like an improvement to me. Obviously doesn't handle the case where the parent is animating *while* we snap back, but don't think there is really a reasonable interpretation of that.
Comment 3 Dan Winship 2010-11-19 16:58:59 UTC
well... currently we animate the drag actor back to the right stage-relative coordinates, and then reparent it. We could instead reparent it first, and then move it to the right parent-relative coordinates. I think that would work fine as long as the parent wasn't clip-to-allocation.

But we can always do that later as well; we'll still need this three-way split in the snapback position logic.
Comment 4 Dan Winship 2010-11-19 20:10:59 UTC
Attachment 174850 [details] pushed as b956c6f - dnd: when snapping back, deal with moved/rescaled parents