aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/mod.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index 9ffe5bab..8c1374d3 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -343,13 +343,12 @@ impl ClientDndGrabHandler for State {
// example. On successful drop, additionally activate the target window.
let mut activate_output = true;
if let Some(target) = validated.then_some(target).flatten() {
- if let Some(root) = self.niri.root_surface.get(&target) {
- if let Some((mapped, _)) = self.niri.layout.find_window_and_output(root) {
- let window = mapped.window.clone();
- self.niri.layout.activate_window(&window);
- self.niri.layer_shell_on_demand_focus = None;
- activate_output = false;
- }
+ let root = self.niri.find_root_shell_surface(&target);
+ if let Some((mapped, _)) = self.niri.layout.find_window_and_output(&root) {
+ let window = mapped.window.clone();
+ self.niri.layout.activate_window(&window);
+ self.niri.layer_shell_on_demand_focus = None;
+ activate_output = false;
}
}