From f1894f6f9a7470b8b1493cf96b28a48e8a704636 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 22 Aug 2024 18:58:07 +1000 Subject: feature: add on-demand vrr (#586) * feature: add on-demand vrr * Don't require connector::Info in try_to_set_vrr * Improve VRR help message * Rename connector_handle => connector * Fix tracy span name * Move on demand vrr flag set higher * wiki: Mention on-demand VRR --------- Co-authored-by: Ivan Molodetskikh --- src/window/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/window') diff --git a/src/window/mod.rs b/src/window/mod.rs index 0e0774fd..4d06bb04 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -72,6 +72,9 @@ pub struct ResolvedWindowRules { /// Whether to block out this window from certain render targets. pub block_out_from: Option, + + /// Whether to enable VRR on this window's primary output if it is on-demand. + pub variable_refresh_rate: Option, } impl<'a> WindowRef<'a> { @@ -132,6 +135,7 @@ impl ResolvedWindowRules { geometry_corner_radius: None, clip_to_geometry: None, block_out_from: None, + variable_refresh_rate: None, } } @@ -231,6 +235,9 @@ impl ResolvedWindowRules { if let Some(x) = rule.block_out_from { resolved.block_out_from = Some(x); } + if let Some(x) = rule.variable_refresh_rate { + resolved.variable_refresh_rate = Some(x); + } } resolved.open_on_output = open_on_output.map(|x| x.to_owned()); -- cgit