mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 05:29:48 +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)
|
||||
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?
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue