now really fix clients not being focused after unmapping a layer surface

This commit is contained in:
Leonardo Hernández Hernández 2022-09-18 17:23:07 -05:00
parent 570e6e2c27
commit fbaeb85363
No known key found for this signature in database
GPG key ID: E538897EE11B9624

9
dwl.c
View file

@ -617,7 +617,7 @@ arrangelayers(Monitor *m)
wl_list_for_each_reverse(layersurface, wl_list_for_each_reverse(layersurface,
&m->layers[layers_above_shell[i]], link) { &m->layers[layers_above_shell[i]], link) {
if (layersurface->layer_surface->current.keyboard_interactive && if (layersurface->layer_surface->current.keyboard_interactive &&
layersurface->layer_surface->mapped) { layersurface->mapped) {
/* Deactivate the focused client. */ /* Deactivate the focused client. */
focusclient(NULL, 0); focusclient(NULL, 0);
exclusive_focus = layersurface; exclusive_focus = layersurface;
@ -1177,10 +1177,9 @@ focusclient(Client *c, int lift)
struct wlr_layer_surface_v1 *wlr_layer_surface = struct wlr_layer_surface_v1 *wlr_layer_surface =
wlr_layer_surface_v1_from_wlr_surface(old); wlr_layer_surface_v1_from_wlr_surface(old);
if (wlr_layer_surface && wlr_layer_surface->mapped && ( if (wlr_layer_surface && ((LayerSurface *)wlr_layer_surface->data)->mapped
wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP || && (wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP
wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY || wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY))
))
return; return;
} else { } else {
Client *w; Client *w;