Add missing interactively moved window check in center_window
Browse files at this commit142e57450dae5eba25b7f306d3c6dc9f51518a3dParent: 80815a11 changed file +6 -0
- src/layout/mod.rs +6 -0
src/layout/mod.rsmodified+6 -0
| @@ -2041,6 +2041,12 @@ impl<W: LayoutElement> Layout<W> { | |||
| 2041 | } | 2041 | } |
| 2042 | 2042 | ||
| 2043 | pub fn center_window(&mut self, id: Option<&W::Id>) { | 2043 | pub fn center_window(&mut self, id: Option<&W::Id>) { |
| 2044 | + if let Some(InteractiveMoveState::Moving(move_)) = &mut self.interactive_move { | ||
| 2045 | + if id.is_none() || id == Some(move_.tile.window().id()) { | ||
| 2046 | + return; | ||
| 2047 | + } | ||
| 2048 | + } | ||
| 2049 | + | ||
| 2044 | let workspace = if let Some(id) = id { | 2050 | let workspace = if let Some(id) = id { |
| 2045 | Some(self.workspaces_mut().find(|ws| ws.has_window(id)).unwrap()) | 2051 | Some(self.workspaces_mut().find(|ws| ws.has_window(id)).unwrap()) |
| 2046 | } else { | 2052 | } else { |