[mutter/gnome-3-24] backends/x11: Handle left-handed mode on pen/eraser devices correctly



commit 02798ceeb68f006457cdb50ab45fc83a01f95afa
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jun 16 18:06:03 2017 +0200

    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 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 e111ceb..d2e2d99 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",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]