summaryrefslogtreecommitdiff
path: root/src/backends/x11/meta-input-settings-x11.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-06-16 18:06:03 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-06-20 22:02:04 +0200
commitd23275bc766c184f0f49d6f9422a5dd549ccbb28 (patch)
tree56216b1698b38e2c12bddcf4997933276fa56255 /src/backends/x11/meta-input-settings-x11.c
parent48e820235ea8129c232695874a3336a448f71450 (diff)
downloadmutter-d23275bc766c184f0f49d6f9422a5dd549ccbb28.tar.gz
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
Diffstat (limited to 'src/backends/x11/meta-input-settings-x11.c')
-rw-r--r--src/backends/x11/meta-input-settings-x11.c7
1 files changed, 6 insertions, 1 deletions
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",