From 074fed313bda854f3036e81dac911bab5818f5bd Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Wed, 27 Jul 2022 02:45:31 +0300 Subject: [PATCH] effects/desktopgrid: Fix dragging and swapping desktops on a grid Amends 00ba4aedccd6cc32ca11b94aea4ab26be7e8c438. --- src/effects/desktopgrid/qml/DesktopView.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/effects/desktopgrid/qml/DesktopView.qml b/src/effects/desktopgrid/qml/DesktopView.qml index 87e2508be2..4f4fc1d244 100644 --- a/src/effects/desktopgrid/qml/DesktopView.qml +++ b/src/effects/desktopgrid/qml/DesktopView.qml @@ -31,12 +31,14 @@ FocusScope { drag.accepted = true; } onDropped: { - if (drag.source instanceof DropArea) { + if (drag.source instanceof DesktopView) { + // dragging a desktop as a whole if (desktopView === drag.source) { return; } effect.swapDesktops(drag.source.desktop.x11DesktopNumber, desktop.x11DesktopNumber); } else { + // dragging a KWin::Window drag.source.desktop = desktopView.desktop.x11DesktopNumber; } }