[mutter/wip/carlosg/tablet-mapping-fixes: 15/16] backends: Only default to builtin panel on touchscreen devices
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/tablet-mapping-fixes: 15/16] backends: Only default to builtin panel on touchscreen devices
- Date: Thu, 2 Dec 2021 14:21:26 +0000 (UTC)
commit 1088b6766a18ef3ee53f6690a0fdc387ae6cc51a
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 24 18:34:31 2021 +0100
backends: Only default to builtin panel on touchscreen devices
Non-display-attached tablets (e.g. Intuos) may find no match, which
should mean "use the span of all monitors", not "pick one for me".
Reserve this fallback to touchscreen devices, since these might
still benefit from it.
src/backends/meta-input-mapper.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c
index 9760bacc2d..a471d18e4b 100644
--- a/src/backends/meta-input-mapper.c
+++ b/src/backends/meta-input-mapper.c
@@ -536,13 +536,17 @@ guess_candidates (MetaInputMapper *mapper,
if (info->matches->len == 0)
{
- DeviceMatch match = { 0 };
+ if (clutter_input_device_get_device_type (input->device) ==
+ CLUTTER_TOUCHSCREEN_DEVICE)
+ {
+ DeviceMatch match = { 0 };
- match.monitor =
- meta_monitor_manager_get_laptop_panel (mapper->monitor_manager);
+ match.monitor =
+ meta_monitor_manager_get_laptop_panel (mapper->monitor_manager);
- if (match.monitor != NULL)
- g_array_append_val (info->matches, match);
+ if (match.monitor != NULL)
+ g_array_append_val (info->matches, match);
+ }
info->best = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]