diff options
author | vaxerski <[email protected]> | 2023-10-04 13:48:44 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-10-04 13:48:44 +0100 |
commit | 230356012be03412db78a9e85c711ec878fd0a69 (patch) | |
tree | 78c70e3b7cac1a2d83af0c7cdc7c7ca5241e9bce | |
parent | 4531717f3ee58f6093f62e5afb21da6599b5a813 (diff) | |
download | Hyprland-230356012be03412db78a9e85c711ec878fd0a69.tar.gz Hyprland-230356012be03412db78a9e85c711ec878fd0a69.zip |
renderer: extract solitary check into frame handler
-rw-r--r-- | src/events/Monitors.cpp | 4 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 82577dae..8619ade3 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -149,9 +149,11 @@ void Events::listener_monitorFrame(void* owner, void* data) { if (!PMONITOR->m_bEnabled) return; + g_pHyprRenderer->recheckSolitaryForMonitor(PMONITOR); + PMONITOR->tearingState.busy = false; - if (PMONITOR->tearingState.activelyTearing) { + if (PMONITOR->tearingState.activelyTearing && PMONITOR->solitaryClient /* can be invalidated by a recheck */) { if (!PMONITOR->tearingState.frameScheduledWhileBusy) return; // we did not schedule a frame yet to be displayed, but we are tearing. Why render? diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index bee1605d..a685f735 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -846,7 +846,6 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { // tearing and DS first bool shouldTear = false; - recheckSolitaryForMonitor(pMonitor); if (pMonitor->tearingState.nextRenderTorn) { pMonitor->tearingState.nextRenderTorn = false; |