xserver-multidpi/hw
Hans de Goede 1dba5a0b19 linux: Add linux_parse_vt_settings and linux_get_keeptty helpers
systemd-logind integration does not work when starting X on a new tty, as
that detaches X from the current session and after hat systemd-logind revokes
all rights on any already open fds and refuses to open new fds for X.

This means that currently e.g. "startx -- vt7" breaks, and breaks badly,
requiring ssh access to the system to kill X.

The fix for this is easy, we must not use systemd-logind integration when
not using KeepTty, or iow we may only use systemd-logind integration together
with KeepTty.

But the final KeepTty value is not known until the code to chose which vtno to
run on has been called, which currently happens after intializing
systemd-logind.

This commit is step 1 in fixing the "startx -- vt7" breakage, it factors out
the linux xf86OpenConsole bits which set xf86Info.vtno and keepTty so that
these can be called earlier. Calling this earlier is safe as this code has
no side effects other than setting xf86Info.vtno and keepTty.

Note this basically only moves a large chunk of xf86OpenConsole() into
linux_parse_vt_settings() without changing a single line of it, this is
hard to see in the diff because the identation level has changed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-03 11:31:30 +02:00
..
dmx Convert hw/dmx to new *allocarray functions 2015-04-21 16:58:08 -07:00
kdrive Xephyr: Fix broken image when endianess of client machine and host-Xserver differ 2015-05-12 09:53:25 -07:00
vfb Convert hw/xnest & hw/vfb to new *allocarray functions 2015-04-21 16:58:08 -07:00
xfree86 linux: Add linux_parse_vt_settings and linux_get_keeptty helpers 2015-06-03 11:31:30 +02:00
xnest Merge remote-tracking branch 'jturney/mingw-build-fixes' 2015-05-11 15:36:53 -07:00
xquartz Fix XQuartz build 2015-03-31 09:02:28 -07:00
xwayland xwayland: Throttle our cursor surface updates with a frame callback 2015-05-27 08:21:00 -07:00
xwin hw/xwin/winclipboard: Link xwinclip with -lpthread 2015-04-22 12:55:25 +01:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00