mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
backends: Distinguish "no EDID" from "any EDID" mapping tablets
Since the Wacom panel rewrite, the "output" setting is handled as a kind of tri-state for display-integrated tablets: - If the setting is unset, the device is automatically mapped to an output - If the setting is set and not empty, the device is mapped to the output defined by the EDID data - If the setting is ['', '', ''], the device is mapped to the span of all displays, like opaque tablets do. This distinction for the unset setting fell through the cracks, so both "Automatic" and "All displays" options were handled as the former. Add this distinction, so that display-integrated tablets can be used like opaque tablets of sorts with no limitations. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2767>
This commit is contained in:
parent
ba25271408
commit
d15c6953d8
@ -425,6 +425,8 @@ guess_candidates (MetaInputMapper *mapper,
|
||||
GList *monitors, *l;
|
||||
gboolean builtin = FALSE;
|
||||
gboolean integrated = TRUE;
|
||||
gboolean automatic;
|
||||
g_autoptr (GVariant) user_value = NULL;
|
||||
|
||||
#ifdef HAVE_LIBWACOM
|
||||
if (clutter_input_device_get_device_type (input->device) != CLUTTER_TOUCHSCREEN_DEVICE)
|
||||
@ -446,6 +448,9 @@ guess_candidates (MetaInputMapper *mapper,
|
||||
}
|
||||
#endif
|
||||
|
||||
user_value = g_settings_get_user_value (input->settings, "output");
|
||||
automatic = user_value == NULL;
|
||||
|
||||
monitors = meta_monitor_manager_get_monitors (mapper->monitor_manager);
|
||||
|
||||
for (l = monitors; l; l = l->next)
|
||||
@ -455,16 +460,16 @@ guess_candidates (MetaInputMapper *mapper,
|
||||
|
||||
g_assert (META_IS_MONITOR (l->data));
|
||||
|
||||
if (integrated && match_edid (input, l->data, &edid_match))
|
||||
if (automatic && integrated && match_edid (input, l->data, &edid_match))
|
||||
match.score |= 1 << edid_match;
|
||||
|
||||
if (integrated && match_size (input, l->data))
|
||||
if (automatic && integrated && match_size (input, l->data))
|
||||
match.score |= 1 << META_MATCH_SIZE;
|
||||
|
||||
if (builtin && match_builtin (mapper, l->data))
|
||||
if (automatic && builtin && match_builtin (mapper, l->data))
|
||||
match.score |= 1 << META_MATCH_IS_BUILTIN;
|
||||
|
||||
if (match_config (input, l->data))
|
||||
if (!automatic && match_config (input, l->data))
|
||||
match.score |= 1 << META_MATCH_CONFIG;
|
||||
|
||||
if (match.score > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user