From 977fe20c1b81da8182d4bfa78a016b0a0d13693c Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 3 Jan 2023 23:11:34 +0100 Subject: [PATCH] Do not apply EDID mapping heuristics to non-integrated tablets Resolves: #2047341 --- ...ply-EDID-based-tablet-mapping-heuris.patch | 34 +++++++++++++++++++ mutter.spec | 8 ++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0001-backends-Only-apply-EDID-based-tablet-mapping-heuris.patch diff --git a/0001-backends-Only-apply-EDID-based-tablet-mapping-heuris.patch b/0001-backends-Only-apply-EDID-based-tablet-mapping-heuris.patch new file mode 100644 index 0000000..68f1397 --- /dev/null +++ b/0001-backends-Only-apply-EDID-based-tablet-mapping-heuris.patch @@ -0,0 +1,34 @@ +From ba25271408a32a2a73a82acc6e094a611001c9f0 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Fri, 16 Dec 2022 23:06:33 +0100 +Subject: [PATCH] backends: Only apply EDID-based tablet mapping heuristic on + integrated devices + +These are the ones attached to a display, thus they are the ones that may need +help from this heuristic. Non-integrated tablets (e.g. Intuos) will default to +the span of all monitors. + +Fixes mapping of opaque tablets if a display-integrated tablet of the same +brand is also plugged in. + +Part-of: +--- + src/backends/meta-input-mapper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c +index cc75f14e8..71d193e5f 100644 +--- a/src/backends/meta-input-mapper.c ++++ b/src/backends/meta-input-mapper.c +@@ -455,7 +455,7 @@ guess_candidates (MetaInputMapper *mapper, + + g_assert (META_IS_MONITOR (l->data)); + +- if (match_edid (input, l->data, &edid_match)) ++ if (integrated && match_edid (input, l->data, &edid_match)) + match.score |= 1 << edid_match; + + if (integrated && match_size (input, l->data)) +-- +2.38.1 + diff --git a/mutter.spec b/mutter.spec index 106ce48..73cda9f 100644 --- a/mutter.spec +++ b/mutter.spec @@ -10,7 +10,7 @@ Name: mutter Version: 40.9 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -105,6 +105,8 @@ Patch41: 0001-monitor-manager-Add-NightLightSupported-property-to-.patch Patch42: 0001-output-kms-Add-more-heuristics-to-decide-when-to-off.patch Patch43: 0002-output-kms-Don-t-attemp-to-add-common-modes-on-conne.patch +Patch44: 0001-backends-Only-apply-EDID-based-tablet-mapping-heuris.patch + BuildRequires: chrpath BuildRequires: pango-devel BuildRequires: startup-notification-devel @@ -252,6 +254,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter-%{mutter_api_version}/tests %changelog +* Tue Jan 03 2023 Carlos Garnacho ) - 40.9-13 +- Do not apply EDID mapping heuristics to non-integrated tablets + Resolves: #2047341 + * Tue Dec 06 2022 Jonas Ã…dahl ) - 40.9-12 - Add missing dependency for mutter-devel Resolves: #2004832