summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-09-04 18:24:18 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-09-04 18:24:18 +0200
commit4eecb8bffc829ab2222b4acea1942ef8ee7b8904 (patch)
treeee2bf6aa48e2a59dedc33436f4e5cf3b04dcd439 /src
parentd9937fcdba978af4f36be6cb20311e08f43841f5 (diff)
config: don't enable vrr 2 for maximized workspaces
fixes #3162
Diffstat (limited to 'src')
-rw-r--r--src/config/ConfigManager.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 48b4dee5..5286dce5 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -2081,9 +2081,8 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
if (m->vrrActive) {
wlr_output_enable_adaptive_sync(m->output, 0);
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
- }
}
m->vrrActive = false;
return;
@@ -2096,9 +2095,8 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
wlr_output_enable_adaptive_sync(m->output, 0);
}
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
- }
}
m->vrrActive = true;
return;
@@ -2111,7 +2109,9 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
if (!PWORKSPACE)
return; // ???
- if (PWORKSPACE->m_bHasFullscreenWindow && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) {
+ const auto WORKSPACEFULL = PWORKSPACE->m_bHasFullscreenWindow && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL;
+
+ if (WORKSPACEFULL && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) {
wlr_output_enable_adaptive_sync(m->output, 1);
if (!wlr_output_test(m->output)) {
@@ -2119,15 +2119,14 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
wlr_output_enable_adaptive_sync(m->output, 0);
}
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
- }
- } else if (!PWORKSPACE->m_bHasFullscreenWindow && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) {
+
+ } else if (!WORKSPACEFULL && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) {
wlr_output_enable_adaptive_sync(m->output, 0);
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
- }
}
}
};