keybinds: Allow fullscreen/maximize in special workspace (#4921)

* allow fullscreen/maximize in special workspace

* remove duplicate code

* hide top layer

* fix special fullscreen deco

* edit

* fix fade top layer when toggle special

* remove double render
This commit is contained in:
thejch 2024-03-04 15:29:45 -08:00 committed by GitHub
parent 7a76ab01d1
commit 9c48c322d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 24 additions and 11 deletions

View file

@ -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