mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 19:45:58 +01:00
renderer: Fixup double rendering cases with special (#3928)
* fixup * better fullscreen
This commit is contained in:
parent
d79cf0afe2
commit
822775aa8c
1 changed files with 23 additions and 4 deletions
|
@ -189,6 +189,9 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp
|
||||||
if (w->m_bIsFullscreen || w->m_bIsFloating)
|
if (w->m_bIsFullscreen || w->m_bIsFloating)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID))
|
||||||
|
continue;
|
||||||
|
|
||||||
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,9 +206,16 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp
|
||||||
if (w->m_bIsFullscreen || !w->m_bIsFloating)
|
if (w->m_bIsFullscreen || !w->m_bIsFloating)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (w->m_iMonitorID == pWorkspace->m_iMonitorID && pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (pWorkspace->m_bIsSpecialWorkspace && w->m_iMonitorID != pWorkspace->m_iMonitorID)
|
||||||
|
continue; // special on another are rendered as a part of the base pass
|
||||||
|
|
||||||
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: this pass sucks
|
||||||
for (auto& w : g_pCompositor->m_vWindows) {
|
for (auto& w : g_pCompositor->m_vWindows) {
|
||||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID);
|
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID);
|
||||||
|
|
||||||
|
@ -217,7 +227,7 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w->m_iWorkspaceID == pMonitor->activeWorkspace && !w->m_bIsFullscreen)
|
if (w->m_iWorkspaceID != pMonitor->activeWorkspace || !w->m_bIsFullscreen)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
renderWindow(w.get(), pMonitor, time, pWorkspace->m_efFullscreenMode != FULLSCREEN_FULL, RENDER_PASS_ALL);
|
renderWindow(w.get(), pMonitor, time, pWorkspace->m_efFullscreenMode != FULLSCREEN_FULL, RENDER_PASS_ALL);
|
||||||
|
@ -236,6 +246,12 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp
|
||||||
if (w->m_iWorkspaceID != pWorkspaceWindow->m_iWorkspaceID || (!w->m_bCreatedOverFullscreen && !w->m_bPinned) || (!w->m_bIsMapped && !w->m_bFadingOut) || w->m_bIsFullscreen)
|
if (w->m_iWorkspaceID != pWorkspaceWindow->m_iWorkspaceID || (!w->m_bCreatedOverFullscreen && !w->m_bPinned) || (!w->m_bIsMapped && !w->m_bFadingOut) || w->m_bIsFullscreen)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (w->m_iMonitorID == pWorkspace->m_iMonitorID && pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (pWorkspace->m_bIsSpecialWorkspace && w->m_iMonitorID != pWorkspace->m_iMonitorID)
|
||||||
|
continue; // special on another are rendered as a part of the base pass
|
||||||
|
|
||||||
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,7 +272,7 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork
|
||||||
if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
|
if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (w->m_iMonitorID == pWorkspace->m_iMonitorID && g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID) && !pWorkspace->m_bIsSpecialWorkspace)
|
if (pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// render active window after all others of this pass
|
// render active window after all others of this pass
|
||||||
|
@ -280,7 +296,7 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork
|
||||||
if (w->m_bIsFloating)
|
if (w->m_bIsFloating)
|
||||||
continue; // floating are in the second pass
|
continue; // floating are in the second pass
|
||||||
|
|
||||||
if (w->m_iMonitorID == pWorkspace->m_iMonitorID && g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID) && !pWorkspace->m_bIsSpecialWorkspace)
|
if (pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
|
if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
|
||||||
|
@ -301,9 +317,12 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork
|
||||||
if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
|
if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (w->m_iMonitorID == pWorkspace->m_iMonitorID && g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID) && !pWorkspace->m_bIsSpecialWorkspace)
|
if (w->m_iMonitorID == pWorkspace->m_iMonitorID && pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (pWorkspace->m_bIsSpecialWorkspace && w->m_iMonitorID != pWorkspace->m_iMonitorID)
|
||||||
|
continue; // special on another are rendered as a part of the base pass
|
||||||
|
|
||||||
// render the bad boy
|
// render the bad boy
|
||||||
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue