effects/desktopgrid: Fix dragging and swapping desktops on a grid
Amends 00ba4aedcc
.
This commit is contained in:
parent
f1a45b6509
commit
074fed313b
1 changed files with 3 additions and 1 deletions
|
@ -31,12 +31,14 @@ FocusScope {
|
||||||
drag.accepted = true;
|
drag.accepted = true;
|
||||||
}
|
}
|
||||||
onDropped: {
|
onDropped: {
|
||||||
if (drag.source instanceof DropArea) {
|
if (drag.source instanceof DesktopView) {
|
||||||
|
// dragging a desktop as a whole
|
||||||
if (desktopView === drag.source) {
|
if (desktopView === drag.source) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
effect.swapDesktops(drag.source.desktop.x11DesktopNumber, desktop.x11DesktopNumber);
|
effect.swapDesktops(drag.source.desktop.x11DesktopNumber, desktop.x11DesktopNumber);
|
||||||
} else {
|
} else {
|
||||||
|
// dragging a KWin::Window
|
||||||
drag.source.desktop = desktopView.desktop.x11DesktopNumber;
|
drag.source.desktop = desktopView.desktop.x11DesktopNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue