renderer: extract solitary check into frame handler

This commit is contained in:
vaxerski 2023-10-04 13:48:44 +01:00
parent 4531717f3e
commit 230356012b
2 changed files with 3 additions and 2 deletions

View File

@ -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?

View File

@ -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;