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 {
1036 1036
1037 let excl_focus_on_layer = |layer| {1037 let excl_focus_on_layer = |layer| {
1038 layers.layers_on(layer).find_map(|surface| {1038 layers.layers_on(layer).find_map(|surface| {
1039- let can_receive_exclusive_focus = surface.cached_state().keyboard_interactivity1039+ if surface.cached_state().keyboard_interactivity
1040- == wlr_layer::KeyboardInteractivity::Exclusive;1040+ != wlr_layer::KeyboardInteractivity::Exclusive
1041- can_receive_exclusive_focus1041+ {
1042- .then(|| surface.wl_surface().clone())1042+ return None;
1043- .map(|surface| KeyboardFocus::LayerShell { surface })1043+ }
1044+
1045+ let surface = surface.wl_surface().clone();
1046+ Some(KeyboardFocus::LayerShell { surface })
1044 })1047 })
1045 };1048 };
1046 1049