From f442f435d34e983768fcc83b54374ac94a7f7658 Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:57:52 +0000 Subject: [PATCH] layout: update workspace rules on layout change (#6878) modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp --- src/layout/DwindleLayout.cpp | 3 +++ src/layout/IHyprLayout.cpp | 1 + src/layout/MasterLayout.cpp | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index d1b4b7ca..7fa6fdbc 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -140,6 +140,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for return; PWINDOW->unsetWindowData(PRIORITY_LAYOUT); + PWINDOW->updateWindowData(); static auto PNOGAPSWHENONLY = CConfigValue("dwindle:no_gaps_when_only"); static auto PGAPSINDATA = CConfigValue("general:gaps_in"); @@ -497,6 +498,7 @@ void CHyprDwindleLayout::onWindowRemovedTiling(PHLWINDOW pWindow) { } pWindow->unsetWindowData(PRIORITY_LAYOUT); + pWindow->updateWindowData(); if (pWindow->m_bIsFullscreen) g_pCompositor->setWindowFullscreen(pWindow, false, FULLSCREEN_FULL); @@ -831,6 +833,7 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, eFullscre pWindow->m_vRealSize = pWindow->m_vLastFloatingSize; pWindow->unsetWindowData(PRIORITY_LAYOUT); + pWindow->updateWindowData(); } } else { // if it now got fullscreen, make it fullscreen diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 56d22d4b..528cea72 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -543,6 +543,7 @@ void IHyprLayout::changeWindowFloatingMode(PHLWINDOW pWindow) { g_pHyprRenderer->damageMonitor(g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID)); pWindow->unsetWindowData(PRIORITY_LAYOUT); + pWindow->updateWindowData(); if (pWindow == m_pLastTiledWindow) m_pLastTiledWindow.reset(); diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index b5f2fa9f..d7f264e7 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -265,6 +265,7 @@ void CHyprMasterLayout::onWindowRemovedTiling(PHLWINDOW pWindow) { static auto SMALLSPLIT = CConfigValue("master:allow_small_split"); pWindow->unsetWindowData(PRIORITY_LAYOUT); + pWindow->updateWindowData(); g_pCompositor->setWindowFullscreen(pWindow, false, FULLSCREEN_FULL); @@ -647,6 +648,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { return; PWINDOW->unsetWindowData(PRIORITY_LAYOUT); + PWINDOW->updateWindowData(); static auto PNOGAPSWHENONLY = CConfigValue("master:no_gaps_when_only"); static auto PANIMATE = CConfigValue("misc:animate_manual_resizes"); @@ -923,6 +925,7 @@ void CHyprMasterLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, eFullscree pWindow->m_vRealSize = pWindow->m_vLastFloatingSize; pWindow->unsetWindowData(PRIORITY_LAYOUT); + pWindow->updateWindowData(); } } else { // if it now got fullscreen, make it fullscreen