diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 973005a..644169f 100644 --- gdk/wayland/gdkdevice-wayland.c +++ gdk/wayland/gdkdevice-wayland.c @@ -45,6 +45,18 @@ #include #elif defined(HAVE_LINUX_INPUT_H) #include +#else +/* Neither the Linux uapi header nor its FreeBSD evdev equivalent is + * available (e.g. macOS). wl_pointer.button and wl_tablet_tool.button + * carry these as raw Linux evdev codes over the wire regardless of + * host OS, so define the handful actually used below by hand. */ +#define BTN_LEFT 0x110 +#define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 +#define BTN_FORWARD 0x115 +#define BTN_BACK 0x116 +#define BTN_STYLUS 0x14b +#define BTN_STYLUS2 0x14c #endif #define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */