summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-04-08 14:07:52 +0200
committerKeith Packard <keithp@keithp.com>2015-04-13 10:22:24 -0700
commit21e7d2bb5cd810688bb905b6ed092497ca8a2c59 (patch)
tree43694338958861547181c9fae2987fda95d29b83
parentf1da6bf5d94911e78d2e27e6accf0c6e3aefb331 (diff)
Re-enable non serverfd input devices immediately on vtenter
Non serverfd input devices will never get a systemd-logind dbus resume signal, causing them to never get re-enabled. This commit changes xf86VTEnter() to enable them immediately, fixing this. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89756 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/common/xf86Events.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index c06aaaee1..97a1f97b2 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -583,10 +583,11 @@ xf86VTEnter(void)
/* Turn screen saver off when switching back */
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
- /* If we use systemd-logind it will enable input devices for us */
- if (!systemd_logind_controls_session())
- for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next)
+ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
+ /* Devices with server managed fds get enabled on logind resume */
+ if (!(pInfo->flags & XI86_SERVER_FD))
xf86EnableInputDeviceForVTSwitch(pInfo);
+ }
for (ih = InputHandlers; ih; ih = ih->next) {
if (ih->is_input)