diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-04-26 13:23:57 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-04-26 13:29:36 +0300 |
| commit | 78e3daf5f82b5870e998faf0e1efeaa048730976 (patch) | |
| tree | 1f723d76dfc83c6a827984cd4cd466408154d589 /src/layout/mod.rs | |
| parent | a99a0b2492722d2c254b7bdf172d388123de8996 (diff) | |
| download | niri-78e3daf5f82b5870e998faf0e1efeaa048730976.tar.gz niri-78e3daf5f82b5870e998faf0e1efeaa048730976.tar.bz2 niri-78e3daf5f82b5870e998faf0e1efeaa048730976.zip | |
overview: Activate window upon dropping from interactive move
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index c9ddfbaa..e62380b2 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -3543,6 +3543,7 @@ impl<W: LayoutElement> Layout<W> { column_idx: None, }, activate, + true, removed.width, removed.is_full_width, removed.is_floating, @@ -4392,11 +4393,7 @@ impl<W: LayoutElement> Layout<W> { } // Dragging in the overview shouldn't switch the workspace and so on. - let activate = if self.overview_open { - ActivateWindow::No - } else { - ActivateWindow::Yes - }; + let allow_to_activate_workspace = !self.overview_open; match &mut self.monitor_set { MonitorSet::Normal { @@ -4489,7 +4486,8 @@ impl<W: LayoutElement> Layout<W> { id: ws_id, column_idx: Some(column_idx), }, - activate, + ActivateWindow::Yes, + allow_to_activate_workspace, move_.width, move_.is_full_width, false, @@ -4501,7 +4499,8 @@ impl<W: LayoutElement> Layout<W> { column_idx, Some(tile_idx), move_.tile, - activate == ActivateWindow::Yes, + true, + allow_to_activate_workspace, ); } InsertPosition::Floating => { @@ -4543,7 +4542,8 @@ impl<W: LayoutElement> Layout<W> { id: ws_id, column_idx: None, }, - activate, + ActivateWindow::Yes, + allow_to_activate_workspace, move_.width, move_.is_full_width, true, @@ -4578,7 +4578,7 @@ impl<W: LayoutElement> Layout<W> { ws.add_tile( move_.tile, WorkspaceAddWindowTarget::Auto, - activate, + ActivateWindow::Yes, move_.width, move_.is_full_width, move_.is_floating, |
