mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
input: keyboard/pointer_enter: assert surface != NULL
This commit is contained in:
parent
0dd37f0a36
commit
a319cc813c
1 changed files with 5 additions and 0 deletions
5
input.c
5
input.c
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue