summaryrefslogtreecommitdiff
path: root/gdk/wayland/gdkdevice-wayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk/wayland/gdkdevice-wayland.c')
-rw-r--r--gdk/wayland/gdkdevice-wayland.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 55cfa89a59..4dde62229f 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -49,6 +49,10 @@
#define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */
+#ifndef BTN_STYLUS3
+#define BTN_STYLUS3 0x149 /* Linux 4.15 */
+#endif
+
typedef struct _GdkWaylandDevicePad GdkWaylandDevicePad;
typedef struct _GdkWaylandDevicePadClass GdkWaylandDevicePadClass;
@@ -3611,6 +3615,8 @@ tablet_tool_handle_button (void *data,
n_button = GDK_BUTTON_SECONDARY;
else if (button == BTN_STYLUS2)
n_button = GDK_BUTTON_MIDDLE;
+ else if (button == BTN_STYLUS3)
+ n_button = 8; /* Back */
else
return;