layer: change logic for giving keyboard-interactivity

Use the following logic:
 - Exclusive: Grant regardless of layer (previously it was only given if
   in top or overlay layers) AND grant if in the same or higher layer
   (nearer overlay) compared with other clients with exclusive
   interactivity.
 - On-demand: Grant only if no other layer-shell client has exclusive
   keyboard interactivity. Previously it was treated the same as
   exclusive.
 - None: Unset focus if the commit associated with the 'none' came from
   the currently focused layer. Previously it was just unset regardless.
This commit is contained in:
Johan Malm 2024-03-09 10:31:47 +00:00 committed by Johan Malm
parent 7e419f7584
commit 36058a63e2
2 changed files with 60 additions and 36 deletions

View file

@ -6,6 +6,7 @@
struct server;
struct output;
struct seat;
struct lab_layer_surface {
struct wlr_scene_layer_surface_v1 *scene_layer_surface;
@ -36,5 +37,7 @@ struct lab_layer_popup {
void layers_init(struct server *server);
void layers_arrange(struct output *output);
void layer_try_set_focus(struct seat *seat,
struct wlr_layer_surface_v1 *layer_surface);
#endif /* LABWC_LAYERS_H */