summaryrefslogtreecommitdiff
path: root/src/layout/DwindleLayout.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-23 20:51:01 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-23 20:51:01 +0200
commite4e323a0df852305cd5ee0922e2142319dc92c1f (patch)
treee86cd7a5d7ab111429059d274e3215c37bd227aa /src/layout/DwindleLayout.cpp
parentf76b9c485246849bc3af838503fedbadf68023f5 (diff)
dwindle: disallow swaps between workspaces
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
-rw-r--r--src/layout/DwindleLayout.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp
index ed8da473..fb966153 100644
--- a/src/layout/DwindleLayout.cpp
+++ b/src/layout/DwindleLayout.cpp
@@ -902,6 +902,11 @@ void CHyprDwindleLayout::switchWindows(CWindow* pWindow, CWindow* pWindow2) {
if (!PNODE2 || !PNODE)
return;
+ if (PNODE->workspaceID != PNODE2->workspaceID) {
+ Debug::log(ERR, "Dwindle: Rejecting a swap between workspaces");
+ return;
+ }
+
// we will not delete the nodes, just fix the tree
if (PNODE2->pParent == PNODE->pParent) {
const auto PPARENT = PNODE->pParent;