summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2020-04-16 16:27:36 +0200
committerCarlos Garnacho <carlosg@gnome.org>2020-09-04 22:12:02 +0000
commitcba82d19b3c897f6b2b94b800f8d47f0731e67ff (patch)
treefc6222ddad220a40fc718a65b2a2070301c13a01
parentba937ffbb3579a20341fc2f5adb3b6491f18493a (diff)
downloadmutter-cba82d19b3c897f6b2b94b800f8d47f0731e67ff.tar.gz
backends/input-mapper: Add some g_debug() traces to MetaInputMapper
Add some debug statements to mapping_helper_apply(), enough to work out the heuristic decisions that were taken. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1202
-rw-r--r--src/backends/meta-input-mapper.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c
index e0edd5888..64be9f96a 100644
--- a/src/backends/meta-input-mapper.c
+++ b/src/backends/meta-input-mapper.c
@@ -440,6 +440,9 @@ mapping_helper_apply (MappingHelper *helper,
DeviceCandidates *info;
info = &g_array_index (helper->device_maps, DeviceCandidates, i);
+ g_debug ("Applying mapping %d to input device '%s', capabilities %x", i,
+ clutter_input_device_get_device_name (info->input->device),
+ mapper_input_info_get_caps (info->input));
for (j = 0; j < info->matches->len; j++)
{
@@ -449,6 +452,10 @@ mapping_helper_apply (MappingHelper *helper,
DeviceMatch *match;
match = &g_array_index (info->matches, DeviceMatch, j);
+ g_debug ("Output candidate '%s', score %x",
+ meta_monitor_get_display_name (match->monitor),
+ match->score);
+
monitor = match->monitor;
logical_monitor = meta_monitor_get_logical_monitor (monitor);
output = g_hash_table_lookup (mapper->output_devices,
@@ -460,6 +467,9 @@ mapping_helper_apply (MappingHelper *helper,
if (output->attached_caps & mapper_input_info_get_caps (info->input))
continue;
+ g_debug ("Matched input '%s' with output '%s'",
+ clutter_input_device_get_device_name (info->input->device),
+ meta_monitor_get_display_name (match->monitor));
mapper_output_info_add_input (output, info->input, monitor);
break;
}