Only show otherScreenThumbnail if we are actually dragging

otherScreenThumbnail is used to fake a window thumbnail being dragged
half in the old screen, half in the "new" one (or even more than two)

right now the condition to use it is purely the "real" thumbnail x
or y change, but sometimes especially when the item has just been created
and is being laid out it might trigger an itemDraggedOutOfScreen
when no-one was dragging.

We should never make otherScreenThumbnail visible when we aren't dragging
a thumbnail, so check for Drag being active in the source item.

the item will be kept visible even if drag becomes inactive as before,
as it still needs to be visible for the reset animation

BUG:480564
This commit is contained in:
Marco Martin 2024-02-15 09:58:35 +00:00
parent 1b14b7b2f1
commit 5244f9f406

View file

@ -103,7 +103,9 @@ FocusScope {
otherScreenThumbnail.cloneOf = item
otherScreenThumbnail.x = heapRelativePos.x;
otherScreenThumbnail.y = heapRelativePos.y;
otherScreenThumbnail.visible = true;
if (item.Drag.active) {
otherScreenThumbnail.visible = true;
}
}
}