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> {
1634 || self.workspaces.iter().any(|ws| ws.are_animations_ongoing())1634 || self.workspaces.iter().any(|ws| ws.are_animations_ongoing())
1635 }1635 }
1636 1636
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+
1637 fn update_config(&mut self, options: Rc<Options>) {1642 fn update_config(&mut self, options: Rc<Options>) {
1638 for ws in &mut self.workspaces {1643 for ws in &mut self.workspaces {
1639 ws.update_config(options.clone());1644 ws.update_config(options.clone());
src/niri.rsmodified+2 -2
@@ -275,10 +275,10 @@ impl State {
275 let pointer = &self.niri.seat.get_pointer().unwrap();275 let pointer = &self.niri.seat.get_pointer().unwrap();
276 let location = pointer.current_location();276 let location = pointer.current_location();
277 277
278- // Don't refresh cursor focus during animations.278+ // Don't refresh cursor focus during transitions.
279 if let Some((output, _)) = self.niri.output_under(location) {279 if let Some((output, _)) = self.niri.output_under(location) {
280 let monitor = self.niri.layout.monitor_for_output(output).unwrap();280 let monitor = self.niri.layout.monitor_for_output(output).unwrap();
281- if monitor.are_animations_ongoing() {281+ if monitor.are_transitions_ongoing() {
282 return;282 return;
283 }283 }
284 }284 }