diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/layout.rs | 5 | ||||
| -rw-r--r-- | src/niri.rs | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/layout.rs b/src/layout.rs index a85b7dd7..41dc0d4a 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -1634,6 +1634,11 @@ impl<W: LayoutElement> Monitor<W> { || self.workspaces.iter().any(|ws| ws.are_animations_ongoing()) } + pub fn are_transitions_ongoing(&self) -> bool { + self.workspace_switch.is_some() + || self.workspaces.iter().any(|ws| ws.are_animations_ongoing()) + } + fn update_config(&mut self, options: Rc<Options>) { for ws in &mut self.workspaces { ws.update_config(options.clone()); diff --git a/src/niri.rs b/src/niri.rs index 29bfc905..e54f64f9 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -275,10 +275,10 @@ impl State { let pointer = &self.niri.seat.get_pointer().unwrap(); let location = pointer.current_location(); - // Don't refresh cursor focus during animations. + // Don't refresh cursor focus during transitions. if let Some((output, _)) = self.niri.output_under(location) { let monitor = self.niri.layout.monitor_for_output(output).unwrap(); - if monitor.are_animations_ongoing() { + if monitor.are_transitions_ongoing() { return; } } |
