Commit af6d360b authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix multi-screen drag-and-drop in WindowHeap

DND was failing with the following error

file:///data/projects/usr/lib/qml/org/kde/kwin/private/effects/WindowHeap.qml:96: TypeError: Cannot read property 'mapToGlobal' of undefined


(cherry picked from commit d8faf8ab)
parent 5ccb8f8d
Pipeline #234401 passed with stage
in 21 minutes and 18 seconds
......@@ -93,9 +93,7 @@ FocusScope {
for (let i in screens) {
if (targetScreen === screens[i]) {
found = true;
let globalPos = item.screen.mapToGlobal(item.mapToItem(null, 0,0));
let heapRelativePos = targetScreen.mapFromGlobal(globalPos);
heapRelativePos = heap.mapFromItem(null, heapRelativePos.x, heapRelativePos.y);
const heapRelativePos = heap.mapFromGlobal(item.mapToGlobal(0, 0));
otherScreenThumbnail.cloneOf = item
otherScreenThumbnail.x = heapRelativePos.x;
otherScreenThumbnail.y = heapRelativePos.y;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment