diff options
Diffstat (limited to 'src/handlers')
| -rw-r--r-- | src/handlers/mod.rs | 10 | ||||
| -rw-r--r-- | src/handlers/xdg_shell.rs | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index bfae2213..198c263a 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -76,6 +76,7 @@ use smithay::{ }; pub use crate::handlers::xdg_shell::KdeDecorationsModeState; +use crate::layout::ActivateWindow; use crate::niri::{DndIcon, NewClient, State}; use crate::protocols::foreign_toplevel::{ self, ForeignToplevelHandler, ForeignToplevelManagerState, @@ -551,9 +552,12 @@ impl ForeignToplevelHandler for State { if let Some(requested_output) = wl_output.as_ref().and_then(Output::from_resource) { if Some(&requested_output) != current_output { - self.niri - .layout - .move_to_output(Some(&window), &requested_output, None); + self.niri.layout.move_to_output( + Some(&window), + &requested_output, + None, + ActivateWindow::Smart, + ); } } diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index 6d06fe91..ecae2475 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -43,6 +43,7 @@ use crate::input::resize_grab::ResizeGrab; use crate::input::touch_move_grab::TouchMoveGrab; use crate::input::touch_resize_grab::TouchResizeGrab; use crate::input::{PointerOrTouchStartData, DOUBLE_CLICK_TIME}; +use crate::layout::ActivateWindow; use crate::niri::{CastTarget, PopupGrabState, State}; use crate::utils::transaction::Transaction; use crate::utils::{ @@ -445,9 +446,12 @@ impl XdgShellHandler for State { if let Some(requested_output) = requested_output { if Some(&requested_output) != current_output { - self.niri - .layout - .move_to_output(Some(&window), &requested_output, None); + self.niri.layout.move_to_output( + Some(&window), + &requested_output, + None, + ActivateWindow::Smart, + ); } } |
