GNOME Bugzilla – Bug 635272
dnd: when snapping back, deal with moved/rescaled parents
Last modified: 2010-11-19 20:11:01 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"
Created attachment 174850 [details] [review] dnd: when snapping back, deal with moved/rescaled parents
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.
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.
Attachment 174850 [details] pushed as b956c6f - dnd: when snapping back, deal with moved/rescaled parents