From 97bf16e5b6e00f0f23cbbd02108274e9464cb9ad Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 11 Feb 2018 21:24:38 +0100 Subject: [PATCH] Wayland: Check for wayland protocol version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wl_keyboard version 4 is more recent than the libwayland available in UbuntuĀ 14.04. --- src/wl_init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wl_init.c b/src/wl_init.c index 2a4edb03..9ee73344 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -437,6 +437,7 @@ static void keyboardHandleModifiers(void* data, _glfw.wl.xkb.modifiers = modifiers; } +#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION static void keyboardHandleRepeatInfo(void* data, struct wl_keyboard* keyboard, int32_t rate, @@ -448,6 +449,7 @@ static void keyboardHandleRepeatInfo(void* data, _glfw.wl.keyboardRepeatRate = rate; _glfw.wl.keyboardRepeatDelay = delay; } +#endif static const struct wl_keyboard_listener keyboardListener = { keyboardHandleKeymap, @@ -455,7 +457,9 @@ static const struct wl_keyboard_listener keyboardListener = { keyboardHandleLeave, keyboardHandleKey, keyboardHandleModifiers, +#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION keyboardHandleRepeatInfo, +#endif }; static void seatHandleCapabilities(void* data,