diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-09 11:51:02 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-09 11:55:01 +0300 |
| commit | 142e57450dae5eba25b7f306d3c6dc9f51518a3d (patch) | |
| tree | 7d5b3f08780b5392cbb38bdc52f3ccef35933a50 | |
| parent | 80815a1591aa3362a5e1c095e9ab81b2945041a7 (diff) | |
| download | niri-142e57450dae5eba25b7f306d3c6dc9f51518a3d.tar.gz niri-142e57450dae5eba25b7f306d3c6dc9f51518a3d.tar.bz2 niri-142e57450dae5eba25b7f306d3c6dc9f51518a3d.zip | |
Add missing interactively moved window check in center_window
| -rw-r--r-- | src/layout/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<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 { |
