diff options
| author | bbb651 <bar.ye651@gmail.com> | 2025-01-20 22:52:43 +0200 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-23 12:07:32 +0300 |
| commit | 128b01e04905d833214f52a3c6fab308bcc15ce0 (patch) | |
| tree | 80a7877972b946f5dde1848691f8a34529d15ba7 /src/window | |
| parent | 788c9c6c545c016687b024d28f2806055ddb9fc8 (diff) | |
| download | niri-128b01e04905d833214f52a3c6fab308bcc15ce0.tar.gz niri-128b01e04905d833214f52a3c6fab308bcc15ce0.tar.bz2 niri-128b01e04905d833214f52a3c6fab308bcc15ce0.zip | |
Add `scroll-factor` window rule
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 189049b3..84c33d5e 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -100,6 +100,9 @@ pub struct ResolvedWindowRules { /// Whether to enable VRR on this window's primary output if it is on-demand. pub variable_refresh_rate: Option<bool>, + + /// Multiplier for all scroll events sent to this window. + pub scroll_factor: Option<f64>, } impl<'a> WindowRef<'a> { @@ -190,6 +193,7 @@ impl ResolvedWindowRules { clip_to_geometry: None, block_out_from: None, variable_refresh_rate: None, + scroll_factor: None, } } @@ -301,6 +305,9 @@ impl ResolvedWindowRules { if let Some(x) = rule.variable_refresh_rate { resolved.variable_refresh_rate = Some(x); } + if let Some(x) = rule.scroll_factor { + resolved.scroll_factor = Some(x.0); + } } resolved.open_on_output = open_on_output.map(|x| x.to_owned()); |
