diff --git a/src/niri.rs b/src/niri.rs index e110953c..6df2a895 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -1297,7 +1297,7 @@ impl State { }; let excl_focus_on_layer = |layer| { - layers.layers_on(layer).find_map(|surface| { + layers.layers_on(layer).rev().find_map(|surface| { if surface.cached_state().keyboard_interactivity != wlr_layer::KeyboardInteractivity::Exclusive { @@ -1315,7 +1315,7 @@ impl State { }; let on_d_focus_on_layer = |layer| { - layers.layers_on(layer).find_map(|surface| { + layers.layers_on(layer).rev().find_map(|surface| { let is_on_demand_surface = Some(surface) == self.niri.layer_shell_on_demand_focus.as_ref(); is_on_demand_surface