diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 1f7f6182..69643d10 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2281,7 +2281,7 @@ void CCompositor::updateFullscreenFadeOnWorkspace(CWorkspace* pWorkspace) { const auto PMONITOR = getMonitorFromID(pWorkspace->m_iMonitorID); - if (pWorkspace->m_iID == PMONITOR->activeWorkspace) { + if (pWorkspace->m_iID == PMONITOR->activeWorkspace || pWorkspace->m_iID == PMONITOR->specialWorkspaceID) { for (auto& ls : PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]) { if (!ls->fadingOut) ls->alpha = FULLSCREEN && pWorkspace->m_efFullscreenMode == FULLSCREEN_FULL ? 0.f : 1.f; diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 12857969..7e9bc82a 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -628,6 +628,10 @@ void CMonitor::setSpecialWorkspace(CWorkspace* const pWorkspace) { else g_pInputManager->refocus(); + g_pCompositor->updateFullscreenFadeOnWorkspace(PWORKSPACE); + + g_pConfigManager->ensureVRR(this); + g_pCompositor->updateSuspendedStates(); return; @@ -688,6 +692,10 @@ void CMonitor::setSpecialWorkspace(CWorkspace* const pWorkspace) { g_pHyprRenderer->damageMonitor(this); + g_pCompositor->updateFullscreenFadeOnWorkspace(pWorkspace); + + g_pConfigManager->ensureVRR(this); + g_pCompositor->updateSuspendedStates(); } diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 56539848..02a3dfbe 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -216,7 +216,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for calcPos = calcPos + RESERVED.topLeft; calcSize = calcSize - (RESERVED.topLeft + RESERVED.bottomRight); - if (g_pCompositor->isWorkspaceSpecial(PWINDOW->m_iWorkspaceID)) { + if (g_pCompositor->isWorkspaceSpecial(PWINDOW->m_iWorkspaceID) && !PWINDOW->m_bIsFullscreen) { // if special, we adjust the coords a bit static auto PSCALEFACTOR = CConfigValue("dwindle:special_scale_factor"); @@ -792,7 +792,7 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree if (!g_pCompositor->windowValidMapped(pWindow)) return; - if (on == pWindow->m_bIsFullscreen || g_pCompositor->isWorkspaceSpecial(pWindow->m_iWorkspaceID)) + if (on == pWindow->m_bIsFullscreen) return; // ignore const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); @@ -854,8 +854,9 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree fakeNode.workspaceID = pWindow->m_iWorkspaceID; pWindow->m_vPosition = fakeNode.box.pos(); pWindow->m_vSize = fakeNode.box.size(); + fakeNode.ignoreFullscreenChecks = true; - applyNodeDataToWindow(&fakeNode, true); + applyNodeDataToWindow(&fakeNode); } } diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index a828399a..c7e09186 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -688,7 +688,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { calcPos = calcPos + RESERVED.topLeft; calcSize = calcSize - (RESERVED.topLeft + RESERVED.bottomRight); - if (g_pCompositor->isWorkspaceSpecial(PWINDOW->m_iWorkspaceID)) { + if (g_pCompositor->isWorkspaceSpecial(PWINDOW->m_iWorkspaceID) && !PWINDOW->m_bIsFullscreen) { static auto PSCALEFACTOR = CConfigValue("master:special_scale_factor"); CBox wb = {calcPos + (calcSize - calcSize * *PSCALEFACTOR) / 2.f, calcSize * *PSCALEFACTOR}; @@ -871,7 +871,7 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen if (!g_pCompositor->windowValidMapped(pWindow)) return; - if (on == pWindow->m_bIsFullscreen || g_pCompositor->isWorkspaceSpecial(pWindow->m_iWorkspaceID)) + if (on == pWindow->m_bIsFullscreen) return; // ignore const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 47a4b119..d1b72e53 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -988,9 +988,6 @@ void CKeybindManager::fullscreenActive(std::string args) { if (!PWINDOW) return; - if (g_pCompositor->isWorkspaceSpecial(PWINDOW->m_iWorkspaceID)) - return; - PWINDOW->m_bDontSendFullscreen = false; if (args == "2") PWINDOW->m_bDontSendFullscreen = true; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 303491d1..4e76a972 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -295,6 +295,9 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp if (!w->m_bIsFullscreen) continue; + if (w->m_iMonitorID == pWorkspace->m_iMonitorID && pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) + continue; + renderWindow(w.get(), pMonitor, time, pWorkspace->m_efFullscreenMode != FULLSCREEN_FULL, RENDER_PASS_ALL); if (w->m_iWorkspaceID != pWorkspace->m_iID) @@ -759,8 +762,12 @@ void CHyprRenderer::renderAllClientsForWorkspace(CMonitor* pMonitor, CWorkspace* // special for (auto& ws : g_pCompositor->m_vWorkspaces) { - if (ws->m_iMonitorID == pMonitor->ID && ws->m_fAlpha.value() > 0.f && ws->m_bIsSpecialWorkspace) - renderWorkspaceWindows(pMonitor, ws.get(), time); + if (ws->m_iMonitorID == pMonitor->ID && ws->m_fAlpha.value() > 0.f && ws->m_bIsSpecialWorkspace) { + if (ws->m_bHasFullscreenWindow) + renderWorkspaceWindowsFullscreen(pMonitor, ws.get(), time); + else + renderWorkspaceWindows(pMonitor, ws.get(), time); + } } // pinned always above