mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Stop updating focus during transitions
This also includes touchpad swipes.
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user