From d23275bc766c184f0f49d6f9422a5dd549ccbb28 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 16 Jun 2017 18:06:03 +0200 Subject: [PATCH] backends/x11: Handle left-handed mode on pen/eraser devices correctly Due to the pen/eraser device separation in X11, CLUTTER_TABLET_DEVICE does not apply there, this device type is only used in native/evdev. Checking for CLUTTER_PEN/ERASER_DEVICE makes the left-handed mode correctly applied on tablets. https://bugzilla.gnome.org/show_bug.cgi?id=782027 --- src/backends/x11/meta-input-settings-x11.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c index e111ceb22..d2e2d99f1 100644 --- a/src/backends/x11/meta-input-settings-x11.c +++ b/src/backends/x11/meta-input-settings-x11.c @@ -189,9 +189,14 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings, ClutterInputDevice *device, gboolean enabled) { + ClutterInputDeviceType device_type; guchar value; - if (clutter_input_device_get_device_type (device) == CLUTTER_TABLET_DEVICE) + device_type = clutter_input_device_get_device_type (device); + + if (device_type == CLUTTER_TABLET_DEVICE || + device_type == CLUTTER_PEN_DEVICE || + device_type == CLUTTER_ERASER_DEVICE) { value = enabled ? 3 : 0; change_property (device, "Wacom Rotation",