[gnome-settings-daemon/gnome-3-18] wacom: Apply left handed mode
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-18] wacom: Apply left handed mode
- Date: Mon, 2 Nov 2015 18:45:29 +0000 (UTC)
commit 8ad32bbdc743fb43fd4d4f05d4d7abd605c6cddb
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 e0f3f17..62cb15a 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]