xfree86: always call KDSKBMODE on vt enter with logind

Where we're running with systemd-logind integration we have to assume that
logind may change the KDSKBMODE while we're VT-switched away. If that happens
and we return, our keyboard input may leak to the console.

Fix this by always calling K_OFF/K_RAW on VT switch back. We don't update
the current settings though, so on shutdown we will restore to settings we had
on init. Given the assumption is that if something messes with our vt, it will
mess again anyway, it's not worth the bother.

Fixes #857

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 jobs for wip/keycode-leak in 9 minutes and 14 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Docker Image
passed #442776
debian-testing

00:01:07

 
  Build And Test
passed #442777
autotools-build-and-test

00:08:07

passed #442778
meson-build-and-test

00:04:09