diff options
author | Julian Schuler <[email protected]> | 2022-11-20 19:50:01 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-11-20 18:50:01 +0000 |
commit | 41a8975bd12f42732955ffc56c4a371f3c925205 (patch) | |
tree | 7d44cb8f3d8c4827be4d6c57ac08620774544bad | |
parent | 254c3d166ffbcb33433c59ec6e00b139bb880c55 (diff) | |
download | Hyprland-41a8975bd12f42732955ffc56c4a371f3c925205.tar.gz Hyprland-41a8975bd12f42732955ffc56c4a371f3c925205.zip |
Render focused window at last (#1060)
-rw-r--r-- | src/render/Renderer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 28ed0c7c..d40e8b11 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -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) |