From 142e57450dae5eba25b7f306d3c6dc9f51518a3d Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 9 Jan 2025 11:51:02 +0300 Subject: Add missing interactively moved window check in center_window --- src/layout/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 9fa4681a..9df6d8e6 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -2041,6 +2041,12 @@ impl Layout { } pub fn center_window(&mut self, id: Option<&W::Id>) { + if let Some(InteractiveMoveState::Moving(move_)) = &mut self.interactive_move { + if id.is_none() || id == Some(move_.tile.window().id()) { + return; + } + } + let workspace = if let Some(id) = id { Some(self.workspaces_mut().find(|ws| ws.has_window(id)).unwrap()) } else { -- cgit