aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-09 22:56:02 +0100
committermarha <marha@users.sourceforge.net>2014-03-09 22:56:02 +0100
commit2112b7dec49833ba872bd3ebcd7288930fec0796 (patch)
tree407c80c9a70f590af2d4c3e5c14678827e189331 /xorg-server/hw/xfree86/common/xf86Events.c
parent8badbdef38ce843dc443ddee219eda4040ef2cd5 (diff)
parent3dd4b6420f686b0147d5b8136268cc63196e253b (diff)
downloadvcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.tar.gz
vcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.tar.bz2
vcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa xserver git update 9 Mar 2014 Conflicts: mesalib/src/mapi/glapi/glapi.h xorg-server/hw/kdrive/ephyr/hostx.c
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Events.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index 7b53949fa..06af73903 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -85,6 +85,8 @@
#endif
#include "xf86platformBus.h"
+#include "systemd-logind.h"
+
/*
* This is a toggling variable:
* FALSE = No VT switching keys have been pressed last time around
@@ -556,8 +558,11 @@ xf86VTEnter(void)
/* Turn screen saver off when switching back */
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
- for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next)
- xf86EnableInputDeviceForVTSwitch(pInfo);
+ /* If we use systemd-logind it will enable input devices for us */
+ if (!systemd_logind_controls_session())
+ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next)
+ xf86EnableInputDeviceForVTSwitch(pInfo);
+
for (ih = InputHandlers; ih; ih = ih->next) {
if (ih->is_input)
xf86EnableInputHandler(ih);
@@ -589,10 +594,14 @@ xf86VTSwitch(void)
/*
* Since all screens are currently all in the same state it is sufficient
* check the first. This might change in future.
+ *
+ * VTLeave is always handled here (VT_PROCESS guarantees this is safe),
+ * if we use systemd_logind xf86VTEnter() gets called by systemd-logind.c
+ * once it has resumed all drm nodes.
*/
if (xf86VTOwner())
xf86VTLeave();
- else
+ else if (!systemd_logind_controls_session())
xf86VTEnter();
}