[mutter] backend: Set mapping-mode on X11 pen/eraser devices
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backend: Set mapping-mode on X11 pen/eraser devices
- Date: Wed, 12 Jul 2017 21:49:03 +0000 (UTC)
commit 10b30eaba5e215efbcc07ae3b7660fa934381661
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 30 12:19:25 2017 +0200
backend: Set mapping-mode on X11 pen/eraser devices
And use it in the generic code for the checks about whether mapping to
an specific display applies or not.
https://bugzilla.gnome.org/show_bug.cgi?id=784402
src/backends/meta-input-settings.c | 2 +-
src/backends/x11/meta-input-settings-x11.c | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index c55debe..ac4bddb 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -857,7 +857,7 @@ update_device_display (MetaInputSettings *input_settings,
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
/* If mapping is relative, the device can move on all displays */
- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE ||
+ if (clutter_input_device_get_device_type (device) == CLUTTER_TOUCHSCREEN_DEVICE ||
clutter_input_device_get_mapping_mode (device) ==
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE)
logical_monitor = meta_input_settings_find_logical_monitor (input_settings,
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index 894e4bb..636f98a 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -551,6 +551,15 @@ meta_input_settings_x11_set_tablet_mapping (MetaInputSettings *settings,
g_warning ("Could not set tablet mapping for %s",
clutter_input_device_get_device_name (device));
}
+ else
+ {
+ ClutterInputDeviceMapping dev_mapping;
+
+ dev_mapping = (mapping == G_DESKTOP_TABLET_MAPPING_ABSOLUTE) ?
+ CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE :
+ CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE;
+ clutter_input_device_set_mapping_mode (device, dev_mapping);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]