mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 15:45:57 +01:00
renderer: extract solitary check into frame handler
This commit is contained in:
parent
4531717f3e
commit
230356012b
2 changed files with 3 additions and 2 deletions
|
@ -149,9 +149,11 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
if (!PMONITOR->m_bEnabled)
|
if (!PMONITOR->m_bEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
g_pHyprRenderer->recheckSolitaryForMonitor(PMONITOR);
|
||||||
|
|
||||||
PMONITOR->tearingState.busy = false;
|
PMONITOR->tearingState.busy = false;
|
||||||
|
|
||||||
if (PMONITOR->tearingState.activelyTearing) {
|
if (PMONITOR->tearingState.activelyTearing && PMONITOR->solitaryClient /* can be invalidated by a recheck */) {
|
||||||
|
|
||||||
if (!PMONITOR->tearingState.frameScheduledWhileBusy)
|
if (!PMONITOR->tearingState.frameScheduledWhileBusy)
|
||||||
return; // we did not schedule a frame yet to be displayed, but we are tearing. Why render?
|
return; // we did not schedule a frame yet to be displayed, but we are tearing. Why render?
|
||||||
|
|
|
@ -846,7 +846,6 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
||||||
|
|
||||||
// tearing and DS first
|
// tearing and DS first
|
||||||
bool shouldTear = false;
|
bool shouldTear = false;
|
||||||
recheckSolitaryForMonitor(pMonitor);
|
|
||||||
if (pMonitor->tearingState.nextRenderTorn) {
|
if (pMonitor->tearingState.nextRenderTorn) {
|
||||||
pMonitor->tearingState.nextRenderTorn = false;
|
pMonitor->tearingState.nextRenderTorn = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue