summaryrefslogtreecommitdiff
path: root/src/layout/DwindleLayout.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-12-07 18:53:10 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-12-07 18:57:02 +0000
commitbf5844d60710f68dc5101dac0ff3db008debe30d (patch)
treeeb7d573dc2b166564db60d1721aeb5339dba0136 /src/layout/DwindleLayout.cpp
parent5b7fec481bcd795a518667eb19864d663b1a47d6 (diff)
add failsafe for dwindle windows
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
-rw-r--r--src/layout/DwindleLayout.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp
index 3c491d72..78545c05 100644
--- a/src/layout/DwindleLayout.cpp
+++ b/src/layout/DwindleLayout.cpp
@@ -336,6 +336,16 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) {
g_pCompositor->setWindowFullscreen(PFULLWINDOW, false, FULLSCREEN_FULL);
}
+ // last fail-safe to avoid duplicate fullscreens
+ if ((!OPENINGON || OPENINGON->pWindow == pWindow) && getNodesOnWorkspace(PNODE->workspaceID) > 1) {
+ for (auto& node : m_lDwindleNodesData) {
+ if (node.workspaceID == PNODE->workspaceID && node.pWindow != pWindow) {
+ OPENINGON = &node;
+ break;
+ }
+ }
+ }
+
// if it's the first, it's easy. Make it fullscreen.
if (!OPENINGON || OPENINGON->pWindow == pWindow) {
PNODE->position = PMONITOR->vecPosition + PMONITOR->vecReservedTopLeft;