diff options
| author | Michael Yang <admin@my4ng.dev> | 2024-08-22 18:58:07 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-22 11:58:07 +0300 |
| commit | f1894f6f9a7470b8b1493cf96b28a48e8a704636 (patch) | |
| tree | d70a3ab350d39dea1b8240e2a92b281b01be5d12 /src/window | |
| parent | dfc2d452c55d59d6d9014c98a9da3a082c4f7379 (diff) | |
| download | niri-f1894f6f9a7470b8b1493cf96b28a48e8a704636.tar.gz niri-f1894f6f9a7470b8b1493cf96b28a48e8a704636.tar.bz2 niri-f1894f6f9a7470b8b1493cf96b28a48e8a704636.zip | |
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 <yalterz@gmail.com>
Diffstat (limited to 'src/window')
| -rw-r--r-- | src/window/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<BlockOutFrom>, + + /// Whether to enable VRR on this window's primary output if it is on-demand. + pub variable_refresh_rate: Option<bool>, } 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()); |
