layout: update rules before applying fullscreen nodes in layouts

This commit is contained in:
Vaxry 2024-01-02 14:21:22 +01:00
parent 583b05a8c6
commit 813af393f1
4 changed files with 8 additions and 3 deletions

View file

@ -2284,7 +2284,6 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode
g_pXWaylandManager->setWindowFullscreen(pWindow, pWindow->shouldSendFullscreenState()); g_pXWaylandManager->setWindowFullscreen(pWindow, pWindow->shouldSendFullscreenState());
pWindow->updateDynamicRules();
updateWindowAnimatedDecorationValues(pWindow); updateWindowAnimatedDecorationValues(pWindow);
// make all windows on the same workspace under the fullscreen window // make all windows on the same workspace under the fullscreen window

View file

@ -780,6 +780,9 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree
pWindow->m_bIsFullscreen = on; pWindow->m_bIsFullscreen = on;
PWORKSPACE->m_bHasFullscreenWindow = !PWORKSPACE->m_bHasFullscreenWindow; PWORKSPACE->m_bHasFullscreenWindow = !PWORKSPACE->m_bHasFullscreenWindow;
pWindow->updateDynamicRules();
pWindow->updateWindowDecos();
g_pEventManager->postEvent(SHyprIPCEvent{"fullscreen", std::to_string((int)on)}); g_pEventManager->postEvent(SHyprIPCEvent{"fullscreen", std::to_string((int)on)});
EMIT_HOOK_EVENT("fullscreen", pWindow); EMIT_HOOK_EVENT("fullscreen", pWindow);
@ -824,7 +827,7 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree
pWindow->m_vPosition = fakeNode.box.pos(); pWindow->m_vPosition = fakeNode.box.pos();
pWindow->m_vSize = fakeNode.box.size(); pWindow->m_vSize = fakeNode.box.size();
applyNodeDataToWindow(&fakeNode); applyNodeDataToWindow(&fakeNode, true);
} }
} }

View file

@ -883,6 +883,9 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen
pWindow->m_bIsFullscreen = on; pWindow->m_bIsFullscreen = on;
PWORKSPACE->m_bHasFullscreenWindow = !PWORKSPACE->m_bHasFullscreenWindow; PWORKSPACE->m_bHasFullscreenWindow = !PWORKSPACE->m_bHasFullscreenWindow;
pWindow->updateDynamicRules();
pWindow->updateWindowDecos();
g_pEventManager->postEvent(SHyprIPCEvent{"fullscreen", std::to_string((int)on)}); g_pEventManager->postEvent(SHyprIPCEvent{"fullscreen", std::to_string((int)on)});
EMIT_HOOK_EVENT("fullscreen", pWindow); EMIT_HOOK_EVENT("fullscreen", pWindow);

View file

@ -104,5 +104,5 @@ std::string CHyprBorderDecoration::getDisplayName() {
} }
bool CHyprBorderDecoration::doesntWantBorders() { bool CHyprBorderDecoration::doesntWantBorders() {
return !m_pWindow->m_sSpecialRenderData.border || m_pWindow->m_bX11DoesntWantBorders; return !m_pWindow->m_sSpecialRenderData.border || m_pWindow->m_bX11DoesntWantBorders || m_pWindow->getRealBorderSize() == 0;
} }