Add missing interactively moved window check in center_window

This commit is contained in:
Ivan Molodetskikh
2025-01-09 11:51:02 +03:00
parent 80815a1591
commit 142e57450d
+6
View File
@@ -2041,6 +2041,12 @@ impl<W: LayoutElement> Layout<W> {
}
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 {