diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-28 18:46:27 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-28 18:46:27 +0000 |
| commit | a319cc813c7810addf2efada354d0fa7feaf15a1 (patch) | |
| tree | 9aecb5aea16f9b9a20c83d4c21d9da274a52eb7c | |
| parent | terminal: use the 'text' xcursor pointer whenever selection is possible (diff) | |
input: keyboard/pointer_enter: assert surface != NULL
| -rw-r--r-- | input.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -83,10 +83,13 @@ static void keyboard_enter(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys) { + assert(surface != NULL); + struct wayland *wayl = data; wayl->input_serial = serial; wayl->focused = wayl_terminal_from_surface(wayl, surface); assert(wayl->focused != NULL); + term_focus_in(wayl->focused); term_xcursor_update(wayl->focused); } @@ -426,6 +429,8 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t surface_x, wl_fixed_t surface_y) { + assert(surface != NULL); + struct wayland *wayl = data; struct terminal *term = wayl_terminal_from_surface(wayl, surface); |
