xfree86: Keep a non-seat0 X server from touching VTs (#71258)
authorLaércio de Sousa <lbsousajr@gmail.com>
Thu, 12 Dec 2013 16:22:48 +0000 (14:22 -0200)
committerKeith Packard <keithp@keithp.com>
Wed, 29 Jan 2014 23:28:55 +0000 (15:28 -0800)
commit46cf2a60934076bf568062eb83121ce90b6ff596
tree607a1a5f8ad1f6ac05a5ebe1a574b54f12e80a12
parentb3d3ffd19937827bcbdb833a628f9b1814a6e189
xfree86: Keep a non-seat0 X server from touching VTs (#71258)

Updated patch following Hans de Goede's advice.

If -seat option is passed with a value different from seat0,
X server won't call xf86OpenConsole().

This is needed to avoid any race condition between seat0 and
non-seat0 X servers. If a non-seat0 X server opens a given VT
before a seat0 one which expects to open the same VT, one can
get an inactive systemd-logind graphical session for seat0.

This patch was first tested in a multiseat setup with multiple
video cards and works quite well.

I suppose it can also make things like DontVTSwitch and -sharevts
meaningless for non-seat0 seats, so it may fix bug #69477, too.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71258
       https://bugs.freedesktop.org/show_bug.cgi?id=69477 (maybe)

See also: http://lists.x.org/archives/xorg-devel/2013-October/038391.html
          https://bugzilla.redhat.com/show_bug.cgi?id=1018196

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
hw/xfree86/common/xf86Init.c