plugins/overview: Use correct type to match

The overview effect uses the type of the dragged object to determine
if a single window is dragged or the entires desktop.
Commit 0ff4f84a changed the type of mainBackground, but did not
update the code for matching the type.

BUG: 478746
FIXED-IN: 6.0
This commit is contained in:
Yifan Zhu 2023-12-19 19:30:42 -08:00
parent edaee17a16
commit 09a547361a

View file

@ -409,6 +409,7 @@ FocusScope {
property Item currentHeap
property Item currentBackgroundItem
// Later we use its type to check whether the user is dragging a desktop or a window
Item {
id: mainBackground
@ -540,7 +541,7 @@ FocusScope {
}
onDropped: (drop) => {
drop.accepted = true;
if (drag.source instanceof Kirigami.ShadowedRectangle) {
if (drag.source instanceof Item) {
// dragging a desktop as a whole
if (drag.source === mainBackground) {
drop.action = Qt.IgnoreAction;