diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index f8b8554c..d0a86f3f 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -87,6 +87,7 @@ class CMonitor { bool nextRenderTorn = false; bool ignoreNextFlipEvent = false; bool renderingFromVblankEvent = false; + bool activelyTearing = false; // for the special workspace. 0 means not open. int specialWorkspaceID = 0; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index fefab56b..2e35efa8 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -884,6 +884,8 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { } } + pMonitor->activelyTearing = shouldTear; + EMIT_HOOK_EVENT("preRender", pMonitor); timespec now; @@ -1023,6 +1025,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { TRACY_GPU_ZONE("RenderCursor"); bool lockSoftware = pMonitor == g_pCompositor->getMonitorFromCursor() && *PZOOMFACTOR != 1.f; + lockSoftware = lockSoftware || std::ranges::any_of(g_pCompositor->m_vMonitors, [](const auto& m) { return m->activelyTearing; }); if (lockSoftware) { wlr_output_lock_software_cursors(pMonitor->output, true);