diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-14 17:40:15 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-14 18:37:33 +0400 |
| commit | adbd53327cc597d176da6f7cc23dec72047db90d (patch) | |
| tree | 44694d00722bf8ef2f944ed3db5c4eeae8814d4d /src/input.rs | |
| parent | 99ab96d348b9110b05784f65ed5542b117d2fb04 (diff) | |
| download | niri-adbd53327cc597d176da6f7cc23dec72047db90d.tar.gz niri-adbd53327cc597d176da6f7cc23dec72047db90d.tar.bz2 niri-adbd53327cc597d176da6f7cc23dec72047db90d.zip | |
Advance animations in process_input_event
Diffstat (limited to 'src/input.rs')
| -rw-r--r-- | src/input.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/input.rs b/src/input.rs index 9e7267a9..2f442c34 100644 --- a/src/input.rs +++ b/src/input.rs @@ -9,6 +9,7 @@ use smithay::input::pointer::{AxisFrame, ButtonEvent, MotionEvent, RelativeMotio use smithay::utils::SERIAL_COUNTER; use crate::niri::Niri; +use crate::utils::get_monotonic_time; enum Action { None, @@ -101,6 +102,12 @@ impl Niri { let _span = tracy_client::span!("process_input_event"); trace!("process_input_event"); + // A bit of a hack, but animation end runs some logic (i.e. workspace clean-up) and it + // doesn't always trigger due to damage, etc. So run it here right before it might prove + // important. Besides, animations affect the input, so it's best to have up-to-date values + // here. + self.monitor_set.advance_animations(get_monotonic_time()); + match event { InputEvent::Keyboard { event, .. } => { let serial = SERIAL_COUNTER.next_serial(); |
