render: set refresh to 0 for wayland backend outputs

This commit is contained in:
vaxerski 2023-07-19 00:02:57 +02:00
parent 2fed1badbf
commit f2999e84b9

View file

@ -1619,7 +1619,8 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
}
if (!found) {
wlr_output_set_custom_mode(pMonitor->output, (int)pMonitorRule->resolution.x, (int)pMonitorRule->resolution.y, (int)pMonitorRule->refreshRate * 1000);
wlr_output_set_custom_mode(pMonitor->output, (int)pMonitorRule->resolution.x, (int)pMonitorRule->resolution.y,
(wlr_backend_is_wl(pMonitor->output->backend) ? 0 : (int)pMonitorRule->refreshRate * 1000));
pMonitor->vecSize = pMonitorRule->resolution;
pMonitor->refreshRate = pMonitorRule->refreshRate;
@ -1667,7 +1668,8 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
}
}
} else {
wlr_output_set_custom_mode(pMonitor->output, (int)pMonitorRule->resolution.x, (int)pMonitorRule->resolution.y, (int)pMonitorRule->refreshRate * 1000);
wlr_output_set_custom_mode(pMonitor->output, (int)pMonitorRule->resolution.x, (int)pMonitorRule->resolution.y,
(wlr_backend_is_wl(pMonitor->output->backend) ? 0 : (int)pMonitorRule->refreshRate * 1000));
}
pMonitor->vecSize = pMonitorRule->resolution;