[mutter/wip/tablet-protocol-v2: 53/70] backends: Implement set_tablet_mapping() in native backend
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 53/70] backends: Implement set_tablet_mapping() in native backend
- Date: Wed, 22 Jun 2016 17:37:49 +0000 (UTC)
commit 15b59bc280659ef8c0c93b4505151dbc52595ae6
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri May 13 20:03:15 2016 +0200
backends: Implement set_tablet_mapping() in native backend
We can now just set the mapping through clutter_input_device_set_mapping()
src/backends/native/meta-input-settings-native.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-input-settings-native.c
b/src/backends/native/meta-input-settings-native.c
index 80b144c..2479c5f 100644
--- a/src/backends/native/meta-input-settings-native.c
+++ b/src/backends/native/meta-input-settings-native.c
@@ -246,6 +246,16 @@ meta_input_settings_native_set_tablet_mapping (MetaInputSettings *settings,
ClutterInputDevice *device,
GDesktopTabletMapping mapping)
{
+ ClutterInputDeviceMapping dev_mapping;
+
+ if (mapping == G_DESKTOP_TABLET_MAPPING_ABSOLUTE)
+ dev_mapping = CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE;
+ else if (mapping == G_DESKTOP_TABLET_MAPPING_RELATIVE)
+ dev_mapping = CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE;
+ else
+ return;
+
+ clutter_input_device_set_mapping_mode (device, dev_mapping);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]