diff --git a/src/wl_init.c b/src/wl_init.c index f462d0e6..867bf670 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -639,8 +639,10 @@ int _glfwInitWayland(void) // Sync so we got all initial output events wl_display_roundtrip(_glfw.wl.display); - if (_glfw.wl.seatVersion >= 4) +#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION + if (_glfw.wl.seatVersion >= WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION) _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK); +#endif if (!_glfw.wl.wmBase) { diff --git a/src/wl_window.c b/src/wl_window.c index 8cead60d..f4c745ea 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -346,8 +346,7 @@ static void resizeWindow(_GLFWwindow* window) static void checkScaleChange(_GLFWwindow* window) { - // Check if we will be able to set the buffer scale or not. - if (_glfw.wl.compositorVersion < 3) + if (_glfw.wl.compositorVersion < WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION) return; // Get the scale factor from the highest scale monitor.