Render focused window at last (#1060)

This commit is contained in:
Julian Schuler 2022-11-20 19:50:01 +01:00 committed by GitHub
parent 254c3d166f
commit 41a8975bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -408,6 +408,8 @@ void CHyprRenderer::renderAllClientsForMonitor(const int& ID, timespec* time) {
return;
}
CWindow* lastWindow = nullptr;
// Non-floating main
for (auto& w : g_pCompositor->m_vWindows) {
if (w->isHidden() && !w->m_bIsMapped && !w->m_bFadingOut)
@ -421,11 +423,20 @@ void CHyprRenderer::renderAllClientsForMonitor(const int& ID, timespec* time) {
if (!shouldRenderWindow(w.get(), PMONITOR))
continue;
// render active window after all others of this pass
if (w.get() == g_pCompositor->m_pLastWindow) {
lastWindow = w.get();
continue;
}
// render the bad boy
renderWindow(w.get(), PMONITOR, time, true, RENDER_PASS_MAIN);
}
if (lastWindow)
renderWindow(lastWindow, PMONITOR, time, true, RENDER_PASS_MAIN);
// Non-floating popup
for (auto& w : g_pCompositor->m_vWindows) {
if (w->isHidden() && !w->m_bIsMapped && !w->m_bFadingOut)