mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 13:09:49 +01:00
Render focused window at last (#1060)
This commit is contained in:
parent
254c3d166f
commit
41a8975bd1
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue