[client] wayland: handle mouse/keyboard enter events

This allows mouse and keyboard input to work again on Wayland.
This commit is contained in:
Quantum 2021-01-26 22:17:49 -05:00 committed by Geoffrey McRae
parent 8559b354ae
commit 081d76268a

View File

@ -179,6 +179,8 @@ static void pointerEnterHandler(void * data, struct wl_pointer * pointer,
uint32_t serial, struct wl_surface * surface, wl_fixed_t sxW, uint32_t serial, struct wl_surface * surface, wl_fixed_t sxW,
wl_fixed_t syW) wl_fixed_t syW)
{ {
app_handleEnterEvent(true);
if (wm.relativePointer) if (wm.relativePointer)
return; return;
@ -191,7 +193,7 @@ static void pointerEnterHandler(void * data, struct wl_pointer * pointer,
static void pointerLeaveHandler(void * data, struct wl_pointer * pointer, static void pointerLeaveHandler(void * data, struct wl_pointer * pointer,
uint32_t serial, struct wl_surface * surface) uint32_t serial, struct wl_surface * surface)
{ {
// Do nothing. app_handleEnterEvent(false);
} }
static void pointerAxisHandler(void * data, struct wl_pointer * pointer, static void pointerAxisHandler(void * data, struct wl_pointer * pointer,
@ -269,6 +271,7 @@ static void keyboardKeymapHandler(void * data, struct wl_keyboard * keyboard,
static void keyboardEnterHandler(void * data, struct wl_keyboard * keyboard, static void keyboardEnterHandler(void * data, struct wl_keyboard * keyboard,
uint32_t serial, struct wl_surface * surface, struct wl_array * keys) uint32_t serial, struct wl_surface * surface, struct wl_array * keys)
{ {
app_handleFocusEvent(true);
wm.keyboardEnterSerial = serial; wm.keyboardEnterSerial = serial;
uint32_t * key; uint32_t * key;
@ -279,7 +282,7 @@ static void keyboardEnterHandler(void * data, struct wl_keyboard * keyboard,
static void keyboardLeaveHandler(void * data, struct wl_keyboard * keyboard, static void keyboardLeaveHandler(void * data, struct wl_keyboard * keyboard,
uint32_t serial, struct wl_surface * surface) uint32_t serial, struct wl_surface * surface)
{ {
// Do nothing. app_handleFocusEvent(false);
} }
static void keyboardKeyHandler(void * data, struct wl_keyboard * keyboard, static void keyboardKeyHandler(void * data, struct wl_keyboard * keyboard,