From 5b6c8d5b0f9a807eaf61d7286d41a75f5e6e61e9 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Tue, 20 Sep 2022 09:55:25 +0100 Subject: fix misc fullscreen issues --- src/layout/MasterLayout.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/layout/MasterLayout.cpp') 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) { -- cgit v1.2.3