mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Wayland: Check for wayland protocol version
wl_keyboard version 4 is more recent than the libwayland available in Ubuntu 14.04.
This commit is contained in:
parent
90f5edc0b8
commit
97bf16e5b6
@ -437,6 +437,7 @@ static void keyboardHandleModifiers(void* data,
|
|||||||
_glfw.wl.xkb.modifiers = modifiers;
|
_glfw.wl.xkb.modifiers = modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION
|
||||||
static void keyboardHandleRepeatInfo(void* data,
|
static void keyboardHandleRepeatInfo(void* data,
|
||||||
struct wl_keyboard* keyboard,
|
struct wl_keyboard* keyboard,
|
||||||
int32_t rate,
|
int32_t rate,
|
||||||
@ -448,6 +449,7 @@ static void keyboardHandleRepeatInfo(void* data,
|
|||||||
_glfw.wl.keyboardRepeatRate = rate;
|
_glfw.wl.keyboardRepeatRate = rate;
|
||||||
_glfw.wl.keyboardRepeatDelay = delay;
|
_glfw.wl.keyboardRepeatDelay = delay;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct wl_keyboard_listener keyboardListener = {
|
static const struct wl_keyboard_listener keyboardListener = {
|
||||||
keyboardHandleKeymap,
|
keyboardHandleKeymap,
|
||||||
@ -455,7 +457,9 @@ static const struct wl_keyboard_listener keyboardListener = {
|
|||||||
keyboardHandleLeave,
|
keyboardHandleLeave,
|
||||||
keyboardHandleKey,
|
keyboardHandleKey,
|
||||||
keyboardHandleModifiers,
|
keyboardHandleModifiers,
|
||||||
|
#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION
|
||||||
keyboardHandleRepeatInfo,
|
keyboardHandleRepeatInfo,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static void seatHandleCapabilities(void* data,
|
static void seatHandleCapabilities(void* data,
|
||||||
|
Loading…
Reference in New Issue
Block a user