diff options
author | Mikhail Burakov <mburakov@mailbox.org> | 2023-04-02 20:45:16 +0200 |
---|---|---|
committer | Mikhail Burakov <mburakov@mailbox.org> | 2023-04-07 13:48:06 +0200 |
commit | 779b65bc22e0463f42161f0e03fee2cef9b2d790 (patch) | |
tree | 29d252c1615c0d792bd2b1e2daf5ea556d09e7e2 /window.c | |
parent | 0107291f780228edd3bae34cca59974a5734feda (diff) |
Implement support for keyboard events
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -197,11 +197,12 @@ static void OnWlKeyboardKeymap(void* data, struct wl_keyboard* wl_keyboard, static void OnWlKeyboardEnter(void* data, struct wl_keyboard* wl_keyboard, uint32_t serial, struct wl_surface* surface, struct wl_array* keys) { - (void)data; (void)wl_keyboard; (void)serial; (void)surface; (void)keys; + struct Window* window = data; + window->event_handlers->OnFocus(window->user, true); } static void OnWlKeyboardLeave(void* data, struct wl_keyboard* wl_keyboard, @@ -210,6 +211,8 @@ static void OnWlKeyboardLeave(void* data, struct wl_keyboard* wl_keyboard, (void)wl_keyboard; (void)serial; (void)surface; + struct Window* window = data; + window->event_handlers->OnFocus(window->user, false); } static void OnWlKeyboardKey(void* data, struct wl_keyboard* wl_keyboard, |