[mutter/wip/tablet-protocol-v2: 48/48] 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: 48/48] backends: Implement set_tablet_mapping() in native backend
- Date: Fri, 13 May 2016 18:11:31 +0000 (UTC)
commit 06e8b5a802ee794f58dc61d48be4bbb985506ddf
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 9784571..ccbdce0 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_ABSOLUTE;
+ else
+ return;
+
+ clutter_input_device_set_mapping (device, dev_mapping);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]