aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Cella <guidocella91@gmail.com>2020-09-05 06:58:54 +0200
committerGuido Cella <guidocella91@gmail.com>2020-09-05 06:58:54 +0200
commit6b25e7ef27392bf8f0617bb62918ec6a7198bce7 (patch)
tree304863b0c57d44e8987808359c27136a2fa6ee55
parent8ee02008777e94e7c75f29635eead7da428dfdaa (diff)
simplify
-rw-r--r--dwl.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/dwl.c b/dwl.c
index 5758db8..b63480d 100644
--- a/dwl.c
+++ b/dwl.c
@@ -556,7 +556,7 @@ arrangelayers(Monitor *m)
ZWLR_LAYER_SHELL_V1_LAYER_TOP,
};
size_t nlayers = LENGTH(layers_above_shell);
- LayerSurface *layersurface, *topmost = NULL;
+ LayerSurface *layersurface;
struct wlr_keyboard *kb = wlr_seat_get_keyboard(seat);
// Arrange exclusive surfaces from top->bottom
@@ -590,18 +590,12 @@ arrangelayers(Monitor *m)
&m->layers[layers_above_shell[i]], link) {
if (layersurface->layer_surface->current.keyboard_interactive &&
layersurface->layer_surface->mapped) {
- topmost = layersurface;
- break;
+ wlr_seat_keyboard_notify_enter(seat, layersurface->layer_surface->surface,
+ kb->keycodes, kb->num_keycodes, &kb->modifiers);
+ return;
}
}
- if (topmost) {
- break;
- }
}
-
- if (topmost)
- wlr_seat_keyboard_notify_enter(seat, topmost->layer_surface->surface,
- kb->keycodes, kb->num_keycodes, &kb->modifiers);
}
void