forge
Explore
Log in

Don't you dare go Hollow

Simplify exclusive focus on layer check

Browse files at this commit

fe682938db2a0aa6e6ffb105a51051a5946a8143Ivan MolodetskikhParent: 6142922
src/niri.rsmodified+8 -5
@@ -1036,11 +1036,14 @@ impl State {
10361036
10371037 let excl_focus_on_layer = |layer| {
10381038 layers.layers_on(layer).find_map(|surface| {
1039- let can_receive_exclusive_focus = surface.cached_state().keyboard_interactivity
1040- == wlr_layer::KeyboardInteractivity::Exclusive;
1041- can_receive_exclusive_focus
1042- .then(|| surface.wl_surface().clone())
1043- .map(|surface| KeyboardFocus::LayerShell { surface })
1039+ if surface.cached_state().keyboard_interactivity
1040+ != wlr_layer::KeyboardInteractivity::Exclusive
1041+ {
1042+ return None;
1043+ }
1044+
1045+ let surface = surface.wl_surface().clone();
1046+ Some(KeyboardFocus::LayerShell { surface })
10441047 })
10451048 };
10461049