Stop updating focus during transitions

This also includes touchpad swipes.
This commit is contained in:
Ivan Molodetskikh
2023-10-21 20:46:41 +04:00
parent 29ddd7006b
commit 8bde252ba4
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -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());
+2 -2
View File
@@ -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;
}
}