diff options
| author | alex-huff <alexhuff@bakahuff.com> | 2025-05-22 08:18:27 -0500 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-22 07:55:29 -0700 |
| commit | d618daf6b9994f8a0a2ff67531fa3ec72af9a122 (patch) | |
| tree | efd257133105a63457c8c18a65be0334e71a193d /src | |
| parent | 357f9157cc63e846a6d8097051a6dce6392d27c9 (diff) | |
| download | niri-d618daf6b9994f8a0a2ff67531fa3ec72af9a122.tar.gz niri-d618daf6b9994f8a0a2ff67531fa3ec72af9a122.tar.bz2 niri-d618daf6b9994f8a0a2ff67531fa3ec72af9a122.zip | |
layer-shell: don't dismiss popups because of unmapped layer surfaces
Fixes #1640
Diffstat (limited to 'src')
| -rw-r--r-- | src/handlers/xdg_shell.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index bf61e37e..a9eceb67 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -334,9 +334,10 @@ impl XdgShellHandler for State { // higher input priority. if layers.layers_on(Layer::Overlay).any(|l| { - l.cached_state().keyboard_interactivity + (l.cached_state().keyboard_interactivity == wlr_layer::KeyboardInteractivity::Exclusive - || Some(l) == self.niri.layer_shell_on_demand_focus.as_ref() + || Some(l) == self.niri.layer_shell_on_demand_focus.as_ref()) + && self.niri.mapped_layer_surfaces.contains_key(l) }) { trace!("ignoring toplevel popup grab because the overlay layer has focus"); let _ = PopupManager::dismiss_popup(&root, &popup); @@ -346,9 +347,10 @@ impl XdgShellHandler for State { let mon = self.niri.layout.monitor_for_output(output).unwrap(); if !mon.render_above_top_layer() && layers.layers_on(Layer::Top).any(|l| { - l.cached_state().keyboard_interactivity + (l.cached_state().keyboard_interactivity == wlr_layer::KeyboardInteractivity::Exclusive - || Some(l) == self.niri.layer_shell_on_demand_focus.as_ref() + || Some(l) == self.niri.layer_shell_on_demand_focus.as_ref()) + && self.niri.mapped_layer_surfaces.contains_key(l) }) { trace!("ignoring toplevel popup grab because the top layer has focus"); |
