summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/helpers/Monitor.cpp2
-rw-r--r--src/render/Renderer.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 84a571a8..360bc977 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -90,8 +90,6 @@ void CMonitor::onConnect(bool noRule) {
wlr_xcursor_manager_load(g_pCompositor->m_sWLRXCursorMgr, monitorRule.scale);
wlr_output_set_transform(output, WL_OUTPUT_TRANSFORM_NORMAL); // TODO: support other transforms
- wlr_output_enable_adaptive_sync(output, 1);
-
// create it in the arr
vecPosition = monitorRule.offset;
vecSize = monitorRule.resolution;
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index e54092be..6718f515 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -984,6 +984,14 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
pMonitor->vecPixelSize = pMonitor->vecSize;
+ // Adaptive sync (VRR)
+ wlr_output_enable_adaptive_sync(pMonitor->output, 1);
+
+ if (!wlr_output_test(pMonitor->output)) {
+ Debug::log(LOG, "Pending output %s does not accept VRR.", pMonitor->output->name);
+ wlr_output_enable_adaptive_sync(pMonitor->output, 0);
+ }
+
// update renderer
g_pHyprOpenGL->destroyMonitorResources(pMonitor);