[mutter/wip/tablet-protocol-v2: 121/149] backends: Disable keep-aspect and output mapping on relative devices
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 121/149] backends: Disable keep-aspect and output mapping on relative devices
- Date: Wed, 20 Jul 2016 17:43:40 +0000 (UTC)
commit e59a32afa5cd4884a68b331ffd0c5d9a40b6e029
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 22 15:42:11 2016 +0200
backends: Disable keep-aspect and output mapping on relative devices
Those settings make no sense there, so should be made ineffective.
src/backends/meta-input-settings.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index e6279f3..b31f2bd 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -618,8 +618,17 @@ update_tablet_keep_aspect (MetaInputSettings *input_settings,
return;
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
- keep_aspect = g_settings_get_boolean (settings, "keep-aspect");
- output = meta_input_settings_find_output (input_settings, settings, device);
+
+ if (clutter_input_device_get_mapping_mode (device) ==
+ CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE)
+ {
+ keep_aspect = g_settings_get_boolean (settings, "keep-aspect");
+ output = meta_input_settings_find_output (input_settings, settings, device);
+ }
+ else
+ {
+ keep_aspect = FALSE;
+ }
input_settings_class->set_tablet_keep_aspect (input_settings, device,
output, keep_aspect);
@@ -641,7 +650,14 @@ update_device_display (MetaInputSettings *input_settings,
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
- output = meta_input_settings_find_output (input_settings, settings, device);
+
+ /* If mapping is relative, the device can move on all displays */
+ if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE ||
+ clutter_input_device_get_mapping_mode (device) ==
+ CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE)
+ output = meta_input_settings_find_output (input_settings, settings, device);
+ else
+ output = NULL;
if (output)
meta_monitor_manager_get_monitor_matrix (priv->monitor_manager,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]