[gnome-settings-daemon/gnome-3-16] wacom: Apply left handed mode
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-16] wacom: Apply left handed mode
- Date: Mon, 2 Nov 2015 18:46:11 +0000 (UTC)
commit a9b764045da5be20533c0c2ea9d9b096ebff4163
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 16 14:14:47 2015 +0200
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
plugins/wacom/gsd-wacom-manager.c | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index a06ced2..a9dd716 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]