From ab2d2af17653a78974b678ac2eee17d406322b99 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 13 May 2016 20:03:15 +0200 Subject: [PATCH] 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 file changed, 10 insertions(+) diff --git a/src/backends/native/meta-input-settings-native.c b/src/backends/native/meta-input-settings-native.c index 80b144c8b..2479c5fb9 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