diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-14 22:28:26 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-14 22:43:24 +0400 |
| commit | 89f9e11f65d00290029e9fb1719f2165de5e8006 (patch) | |
| tree | 626d980fc1b7ef0a2f93f10c8829411b426b3995 /src/input.rs | |
| parent | 092095ead005ff073344b723f00b08a5b845f186 (diff) | |
| download | niri-89f9e11f65d00290029e9fb1719f2165de5e8006.tar.gz niri-89f9e11f65d00290029e9fb1719f2165de5e8006.tar.bz2 niri-89f9e11f65d00290029e9fb1719f2165de5e8006.zip | |
Store Config as Rc<RefCell<>> field
Diffstat (limited to 'src/input.rs')
| -rw-r--r-- | src/input.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs index 3dfe7ae6..72cf9f77 100644 --- a/src/input.rs +++ b/src/input.rs @@ -123,7 +123,8 @@ impl State { time, |self_, mods, keysym| { if event.state() == KeyState::Pressed { - action(&self_.config, comp_mod, keysym, *mods).into() + let config = self_.niri.config.borrow(); + action(&config, comp_mod, keysym, *mods).into() } else { FilterResult::Forward } @@ -743,7 +744,7 @@ impl State { // According to Mutter code, this setting is specific to touchpads. let is_touchpad = device.config_tap_finger_count() > 0; if is_touchpad { - let c = &self.config.input.touchpad; + let c = &self.niri.config.borrow().input.touchpad; let _ = device.config_tap_set_enabled(c.tap); let _ = device.config_scroll_set_natural_scroll_enabled(c.natural_scroll); let _ = device.config_accel_set_speed(c.accel_speed); |
