diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2026-08-29 17:28:39 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-08-29 17:28:39 +0000 |
| commit | 14cd25d4b17408fb09f395b03a5eab0628c7d725 (patch) | |
| tree | 7f7140f95bdf081f4c384fe2a7e28398e38f591e /input.c | |
| parent | Add support for file:// URLs for initial working directory (diff) | |
input: ignore keyboard_enter() with NULL surface
It's a compositor bug to emit a keyboard_enter() event with a NULL
surface, but has been seen happening on Hyprland. Workaround by
ignoring the event.
Closes #2438
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -704,9 +704,13 @@ static void keyboard_enter(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys) { - xassert(surface != NULL); xassert(serial != 0); + if (unlikely(surface == NULL)) { + /* Seen on Hyprland */ + return; + } + struct seat *seat = data; struct wl_window *win = wl_surface_get_user_data(surface); struct terminal *term = win->term; |
