From ca1500ae90f33344fe776898ae11137bf7d1ecc1 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 15 Feb 2025 13:11:34 +0300 Subject: Implement scrolling the view during DnD DnD is external to the layout, so we just inform it when one is ongoing. --- src/handlers/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/handlers') diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index 334ab762..587d44ea 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -344,6 +344,9 @@ impl ClientDndGrabHandler for State { fn dropped(&mut self, target: Option, validated: bool, _seat: Seat) { trace!("client dropped, target: {target:?}, validated: {validated}"); + // End DnD before activating a specific window below so that it takes precedence. + self.niri.layout.dnd_end(); + // Activate the target output, since that's how Firefox drag-tab-into-new-window works for // example. On successful drop, additionally activate the target window. let mut activate_output = true; -- cgit