monitor: clear output state after usage

fixes massive lag
This commit is contained in:
Vaxry
2024-01-27 19:11:03 +00:00
parent 8b1069b330
commit bc7e488a4c
4 changed files with 21 additions and 0 deletions

View File

@@ -1244,9 +1244,13 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
if (UNLOCK_SC)
wlr_output_lock_software_cursors(pMonitor->output, false);
pMonitor->clearState();
return;
}
pMonitor->clearState();
if (shouldTear)
pMonitor->tearingState.busy = true;
@@ -2080,6 +2084,8 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
Debug::log(ERR, "Couldn't commit output named {}", pMonitor->output->name);
}
pMonitor->clearState();
int x, y;
wlr_output_transformed_resolution(pMonitor->output, &x, &y);
pMonitor->vecSize = (Vector2D(x, y) / pMonitor->scale).floor();