[linearView] Fix dnd to dash when zoomed out
While zoomed out, the workspaces view's drop target spans the entire monitor to implement reactive screen edges. When a drop event is not handled by the view, an attempt is made to pass it on down the stack, but it doesn't work properly. Fix it by iterating the target's parents as well. Also improve the code which translates dnd coordinates to target positions. https://bugzilla.gnome.org/show_bug.cgi?id=619203
This commit is contained in:
@ -1136,12 +1136,16 @@ SingleView.prototype = {
|
||||
let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, x, y);
|
||||
dropActor.show();
|
||||
|
||||
if (target._delegate && target._delegate != this && target._delegate.acceptDrop) {
|
||||
let [targX, targY] = target.get_transformed_position();
|
||||
return target._delegate.acceptDrop(source, dropActor,
|
||||
(x - targX) / target.scale_x,
|
||||
(y - targY) / target.scale_y,
|
||||
time);
|
||||
while (target) {
|
||||
if (target._delegate &&
|
||||
target._delegate != this &&
|
||||
target._delegate.acceptDrop) {
|
||||
|
||||
let [r, targX, targY] = target.transform_stage_point(x, y);
|
||||
return target._delegate.acceptDrop(source, dropActor,
|
||||
targX, targY, time);
|
||||
}
|
||||
target = target.get_parent();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user