diff --git a/config.h.meson b/config.h.meson index 4d4a96e611..74a90d3df8 100644 --- a/config.h.meson +++ b/config.h.meson @@ -286,6 +286,10 @@ /* Define to 1 if linux/memfd.h exists */ #mesondefine HAVE_LINUX_MEMFD_H +#mesondefine HAVE_LINUX_INPUT_H + +#mesondefine HAVE_DEV_EVDEV_INPUT_H + #mesondefine GTK_SYSCONFDIR #mesondefine GTK_LOCALEDIR diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 2b28b87aac..c9e710ae1e 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -41,11 +41,13 @@ #include -#include - #include #include +#if defined(HAVE_DEV_EVDEV_INPUT_H) +#include +#elif defined(HAVE_LINUX_INPUT_H) #include +#endif #define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */ diff --git a/meson.build b/meson.build index 895cef9fc0..921c6294a5 100644 --- a/meson.build +++ b/meson.build @@ -149,9 +149,11 @@ cdata.set('GTK_INTERFACE_AGE', gtk_interface_age) check_headers = [ 'crt/externs.h', + 'dev/evdev/input.h', 'dlfcn.h', 'ftw.h', 'inttypes.h', + 'linux/input.h', 'linux/memfd.h', 'locale.h', 'memory.h',