Verified Commit ceed4e14 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

effects/private: Add another guard for multi-screen Drag&Drop

Unlike D&D actions, this method does not return any feedback as to
whether an item drop was accepted by any other screen, and so whether it
is going through destruction process already, so the best we can do is
add another typeof/undefined check after calling that method.

Fixes the following error:

    file:///usr/lib/qml/org/kde/kwin/private/effects/WindowHeapDelegate.qml:415:
    TypeError: Cannot read property 'deleteDND' of undefined

(cherry picked from commit ab79fe47)
parent af6d360b
Pipeline #234459 canceled with stage
in 9 minutes and 13 seconds
......@@ -411,9 +411,11 @@ Item {
var globalPos = targetScreen.mapToGlobal(centroid.scenePosition);
effect.checkItemDroppedOutOfScreen(globalPos, thumbSource);
// else, return to normal without reparenting
thumbSource.deleteDND();
thumb.substate = "normal";
if (typeof thumbSource !== "undefined") {
// else, return to normal without reparenting
thumbSource.deleteDND();
thumb.substate = "normal";
}
}
}
}
......
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