mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 04:01:56 -07:00
renderer: extract solitary check into frame handler
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user