summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index e275db75..3afca2c4 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -84,6 +84,13 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow) {
}
}
+ const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID);
+
+ if (PWORKSPACE->m_bHasFullscreenWindow) {
+ const auto PFULLWINDOW = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
+ g_pCompositor->setWindowFullscreen(PFULLWINDOW, false, FULLSCREEN_FULL);
+ }
+
// recalc
recalculateMonitor(pWindow->m_iMonitorID);
}
@@ -94,6 +101,9 @@ void CHyprMasterLayout::onWindowRemovedTiling(CWindow* pWindow) {
if (!PNODE)
return;
+ if (pWindow->m_bIsFullscreen)
+ g_pCompositor->setWindowFullscreen(pWindow, false, FULLSCREEN_FULL);
+
if (PNODE->isMaster) {
// find new one
for (auto& nd : m_lMasterNodesData) {