summaryrefslogtreecommitdiff
path: root/plugins/wacom
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-10-16 14:14:47 +0200
committerCarlos Garnacho <carlosg@gnome.org>2015-11-02 19:37:10 +0100
commit27d581cfc0e107a9776fd3f8629c7f9c2d0e074e (patch)
tree9d50da5210db36f58941fd661c0bb1e7a96b35bd /plugins/wacom
parentae9a9da52193ba1d13ae83f8dd4630d24ba32ebc (diff)
downloadgnome-settings-daemon-27d581cfc0e107a9776fd3f8629c7f9c2d0e074e.tar.gz
wacom: Apply left handed mode
With the introduction of GsDeviceMapper (commit 0810de0f), left-handed mode became responsibility of this object, which was applied by applying an extra rotation to the device coordinate matrix. Later, the device coordinate matrix handling was lifted to mutter, although the rotation setting was kept in the g-s-d side of the settings split, so GsdDeviceMapper would listen to the wrong settings, and left-handed mode became no mans land. Put the application of this setting back into GsdWacomManager, again translated to the "Wacom Rotation" device property. Nonetheless, all settings should move eventually to mutter domain, and this turned again into modifications to the coordinate matrix. https://bugzilla.gnome.org/show_bug.cgi?id=749767
Diffstat (limited to 'plugins/wacom')
-rw-r--r--plugins/wacom/gsd-wacom-manager.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index e0f3f177..62cb15a9 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -262,6 +262,22 @@ wacom_set_property (GsdWacomDevice *device,
}
static void
+set_rotation (GsdWacomDevice *device,
+ GsdWacomRotation rotation)
+{
+ gchar rot = rotation;
+ PropertyHelper property = {
+ .name = "Wacom Rotation",
+ .nitems = 1,
+ .format = 8,
+ .type = XA_INTEGER,
+ .data.c = &rot
+ };
+
+ wacom_set_property (device, &property);
+}
+
+static void
set_pressurecurve (GsdWacomDevice *device,
GVariant *value)
{
@@ -815,6 +831,8 @@ set_wacom_settings (GsdWacomManager *manager,
grab_button (id, TRUE, manager->priv->screen);
return;
+ } else {
+ set_rotation (device, g_settings_get_enum (settings, KEY_ROTATION));
}
set_absolute (device, g_settings_get_boolean (settings, KEY_IS_ABSOLUTE));
@@ -843,9 +861,10 @@ wacom_settings_changed (GSettings *settings,
type = gsd_wacom_device_get_device_type (device);
if (g_str_equal (key, KEY_ROTATION)) {
- /* Real device rotation is handled in GsdDeviceMapper */
if (type == WACOM_TYPE_PAD)
update_pad_leds (device);
+ else
+ set_rotation (device, g_settings_get_enum (settings, key));
} else if (g_str_equal (key, KEY_TOUCH)) {
if (type == WACOM_TYPE_TOUCH)
set_touch (device, g_settings_get_boolean (settings, key));