aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-18 17:23:07 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-18 17:23:07 -0500
commitfbaeb853638a984c69045923eb662d783035762c (patch)
treeb957fd71d6d7259e4217dfc10eda1baf1fe6f5e0
parent570e6e2c2763bc3a7bd270a9571cfedeb1083fef (diff)
now really fix clients not being focused after unmapping a layer surface
-rw-r--r--dwl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/dwl.c b/dwl.c
index a64f4e7..c1fb9c1 100644
--- a/dwl.c
+++ b/dwl.c
@@ -617,7 +617,7 @@ arrangelayers(Monitor *m)
wl_list_for_each_reverse(layersurface,
&m->layers[layers_above_shell[i]], link) {
if (layersurface->layer_surface->current.keyboard_interactive &&
- layersurface->layer_surface->mapped) {
+ layersurface->mapped) {
/* Deactivate the focused client. */
focusclient(NULL, 0);
exclusive_focus = layersurface;
@@ -1177,10 +1177,9 @@ focusclient(Client *c, int lift)
struct wlr_layer_surface_v1 *wlr_layer_surface =
wlr_layer_surface_v1_from_wlr_surface(old);
- if (wlr_layer_surface && wlr_layer_surface->mapped && (
- wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP ||
- wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
- ))
+ 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_OVERLAY))
return;
} else {
Client *w;