Blame SOURCES/0001-common-Ensure-screen-integrated-devices-get-remapped.patch

7faf05
From 1c1a4201a6456892ba50f9a8ffec2e5cf0c90ec3 Mon Sep 17 00:00:00 2001
7faf05
From: Carlos Garnacho <carlosg@gnome.org>
7faf05
Date: Fri, 5 Jan 2018 18:38:30 +0100
7faf05
Subject: [PATCH 1/3] common: Ensure screen integrated devices get remapped on
7faf05
 hotplug
7faf05
7faf05
GsdDeviceMapper used to refrain from remapping devices that already had
7faf05
a configured output. This however results on wrong mapping when the input
7faf05
device is plugged before the output, since the heuristics will attempt
7faf05
really hard to find an output for the device before the real one is
7faf05
available, and not remapped again when the output is plugged.
7faf05
7faf05
Fix this by forcing remapping on all screen-integrated devices on every
7faf05
hotplug event, so the input device will get remapped to the right screen
7faf05
(hopefully!) when it is plugged. This is not applied to devices mapped
7faf05
to the builtin output, or those with no attached output at all, as in both
7faf05
of these cases the configured output should be left static.
7faf05
7faf05
https://bugzilla.gnome.org/show_bug.cgi?id=748589
7faf05
---
7faf05
 plugins/common/gsd-device-mapper.c | 9 +++++++--
7faf05
 1 file changed, 7 insertions(+), 2 deletions(-)
7faf05
7faf05
diff --git a/plugins/common/gsd-device-mapper.c b/plugins/common/gsd-device-mapper.c
7faf05
index c9a113c4..fae4150f 100644
7faf05
--- a/plugins/common/gsd-device-mapper.c
7faf05
+++ b/plugins/common/gsd-device-mapper.c
7faf05
@@ -603,10 +603,15 @@ mapper_recalculate_candidates (GsdDeviceMapper *mapper)
7faf05
 
7faf05
 		input_info_update_settings_output (input);
7faf05
 
7faf05
-		/* Device has an output from settings */
7faf05
-		if (input->output)
7faf05
+		/* Avoid opaque device with an output from settings and
7faf05
+		 * system-integrated devices that won't get remapped anyway
7faf05
+		 */
7faf05
+		if (input->output &&
7faf05
+                    (input->capabilities & GSD_INPUT_IS_SCREEN_INTEGRATED) == 0)
7faf05
 			continue;
7faf05
 
7faf05
+		/* reset the current output */
7faf05
+		input_info_set_output (input, NULL, FALSE, FALSE);
7faf05
 		input_info_guess_candidates (input, outputs);
7faf05
 		mapping_helper_add (helper, input, outputs);
7faf05
 	}
7faf05
-- 
7faf05
2.14.3
7faf05
7faf05
7faf05
From 9b08637bc3c907886b03accad6f9f4b1a2a575dc Mon Sep 17 00:00:00 2001
7faf05
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
7faf05
Date: Thu, 2 Nov 2017 10:24:43 +0100
7faf05
Subject: [PATCH 2/3] Fix screen mapping for Cintiqs and others
7faf05
7faf05
Size-based input/output matching doesn't raise the "found" flag, which
7faf05
would result on input_info_guess_candidates() still trying to assign the
7faf05
builtin output to the input device if that is the only match found.
7faf05
7faf05
For screen integrated devices (i.e. not on the builtin output) this is
7faf05
and undesirable possibility, setting the "found" flag to TRUE results on
7faf05
the correct output being assigned.
7faf05
7faf05
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
7faf05
7faf05
https://bugzilla.gnome.org/show_bug.cgi?id=748589
7faf05
---
7faf05
 plugins/common/gsd-device-mapper.c | 1 +
7faf05
 1 file changed, 1 insertion(+)
7faf05
7faf05
diff --git a/plugins/common/gsd-device-mapper.c b/plugins/common/gsd-device-mapper.c
7faf05
index fae4150f..d4f7bc35 100644
7faf05
--- a/plugins/common/gsd-device-mapper.c
7faf05
+++ b/plugins/common/gsd-device-mapper.c
7faf05
@@ -257,6 +257,7 @@ input_info_guess_candidates (GsdInputInfo  *input,
7faf05
 
7faf05
 	if (input->capabilities & GSD_INPUT_IS_SCREEN_INTEGRATED) {
7faf05
 		outputs[GSD_PRIO_MATCH_SIZE] = input_info_find_size_match (input, input->mapper->rr_screen);
7faf05
+		found |= outputs[GSD_PRIO_MATCH_SIZE] != NULL;
7faf05
 	}
7faf05
 
7faf05
 	split = g_strsplit (name, " ", -1);
7faf05
-- 
7faf05
2.14.3
7faf05
7faf05
7faf05
From 64004232ff007847c5bf04c9ec2ca8cdb8fd8d5d Mon Sep 17 00:00:00 2001
7faf05
From: Carlos Garnacho <carlosg@gnome.org>
7faf05
Date: Wed, 19 Jul 2017 19:32:41 +0200
7faf05
Subject: [PATCH 3/3] common: Check for wayland before building
7faf05
 GsdUdevDeviceManager
7faf05
7faf05
Udev is rather common, so this check doesn't suffice if anyone wants
7faf05
to build with no wayland support whatsoever.
7faf05
7faf05
https://bugzilla.gnome.org/show_bug.cgi?id=780544
7faf05
---
7faf05
 configure.ac               | 1 +
7faf05
 plugins/common/Makefile.am | 2 +-
7faf05
 2 files changed, 2 insertions(+), 1 deletion(-)
7faf05
7faf05
diff --git a/configure.ac b/configure.ac
7faf05
index bee9abe6..d04f8b66 100644
7faf05
--- a/configure.ac
7faf05
+++ b/configure.ac
7faf05
@@ -140,6 +140,7 @@ if test x$enable_wayland != xno; then
7faf05
                 fi
7faf05
         fi
7faf05
 fi
7faf05
+AM_CONDITIONAL(HAVE_WAYLAND, test x$have_wayland = xyes)
7faf05
 
7faf05
 dnl ================================================================
7faf05
 dnl Plugins
7faf05
diff --git a/plugins/common/Makefile.am b/plugins/common/Makefile.am
7faf05
index 706be129..36cf17cc 100644
7faf05
--- a/plugins/common/Makefile.am
7faf05
+++ b/plugins/common/Makefile.am
7faf05
@@ -40,7 +40,7 @@ libcommon_la_SOURCES = \
7faf05
 	gsd-shell-helper.c	\
7faf05
 	gsd-shell-helper.h
7faf05
 
7faf05
-if HAVE_GUDEV
7faf05
+if HAVE_WAYLAND
7faf05
 libcommon_la_SOURCES += \
7faf05
 	gsd-device-manager-udev.c \
7faf05
 	gsd-device-manager-udev.h
7faf05
-- 
7faf05
2.14.3
7faf05