forge
Explore
Log in

Don't you dare go Hollow

Stop updating focus during transitions

Browse files at this commit

8bde252ba4c8f552cc8bcabcd2b277278884781dIvan MolodetskikhParent: 29ddd70
This also includes touchpad swipes.
src/layout.rsmodified+5 -0
@@ -1634,6 +1634,11 @@ impl<W: LayoutElement> Monitor<W> {
16341634 || self.workspaces.iter().any(|ws| ws.are_animations_ongoing())
16351635 }
16361636
1637+ pub fn are_transitions_ongoing(&self) -> bool {
1638+ self.workspace_switch.is_some()
1639+ || self.workspaces.iter().any(|ws| ws.are_animations_ongoing())
1640+ }
1641+
16371642 fn update_config(&mut self, options: Rc<Options>) {
16381643 for ws in &mut self.workspaces {
16391644 ws.update_config(options.clone());
src/niri.rsmodified+2 -2
@@ -275,10 +275,10 @@ impl State {
275275 let pointer = &self.niri.seat.get_pointer().unwrap();
276276 let location = pointer.current_location();
277277
278- // Don't refresh cursor focus during animations.
278+ // Don't refresh cursor focus during transitions.
279279 if let Some((output, _)) = self.niri.output_under(location) {
280280 let monitor = self.niri.layout.monitor_for_output(output).unwrap();
281- if monitor.are_animations_ongoing() {
281+ if monitor.are_transitions_ongoing() {
282282 return;
283283 }
284284 }