Compute exclusive layer-shell focus in render order
Browse files at this commite5b0c1a8d430ed061ab472f4172b38a6cc961405Parent: ee8a04b1 changed file +2 -2
- src/niri.rs +2 -2
src/niri.rsmodified+2 -2
| @@ -1297,7 +1297,7 @@ impl State { | |||
| 1297 | }; | 1297 | }; |
| 1298 | 1298 | ||
| 1299 | let excl_focus_on_layer = |layer| { | 1299 | let excl_focus_on_layer = |layer| { |
| 1300 | - layers.layers_on(layer).find_map(|surface| { | 1300 | + layers.layers_on(layer).rev().find_map(|surface| { |
| 1301 | if surface.cached_state().keyboard_interactivity | 1301 | if surface.cached_state().keyboard_interactivity |
| 1302 | != wlr_layer::KeyboardInteractivity::Exclusive | 1302 | != wlr_layer::KeyboardInteractivity::Exclusive |
| 1303 | { | 1303 | { |
| @@ -1315,7 +1315,7 @@ impl State { | |||
| 1315 | }; | 1315 | }; |
| 1316 | 1316 | ||
| 1317 | let on_d_focus_on_layer = |layer| { | 1317 | let on_d_focus_on_layer = |layer| { |
| 1318 | - layers.layers_on(layer).find_map(|surface| { | 1318 | + layers.layers_on(layer).rev().find_map(|surface| { |
| 1319 | let is_on_demand_surface = | 1319 | let is_on_demand_surface = |
| 1320 | Some(surface) == self.niri.layer_shell_on_demand_focus.as_ref(); | 1320 | Some(surface) == self.niri.layer_shell_on_demand_focus.as_ref(); |
| 1321 | is_on_demand_surface | 1321 | is_on_demand_surface |