xf86: use new xf86VTOwner interface in a few places
This replaces some previous uses of direct xf86Screens[0] accesses. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@gmail.com>
This commit is contained in:
parent
d61ea1f64d
commit
5b359cf613
|
@ -427,7 +427,7 @@ xf86VTSwitch(void)
|
|||
* Since all screens are currently all in the same state it is sufficient
|
||||
* check the first. This might change in future.
|
||||
*/
|
||||
if (xf86Screens[0]->vtSema) {
|
||||
if (xf86VTOwner()) {
|
||||
|
||||
DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
|
||||
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
|
||||
|
|
|
@ -819,7 +819,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
|||
if (serverGeneration != 1) {
|
||||
xf86Resetting = TRUE;
|
||||
/* All screens are in the same state, so just check the first */
|
||||
if (!xf86Screens[0]->vtSema) {
|
||||
if (!xf86VTOwner()) {
|
||||
#ifdef HAS_USL_VTS
|
||||
ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ);
|
||||
#endif
|
||||
|
|
|
@ -870,7 +870,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
|||
}
|
||||
|
||||
/* Enable it if it's properly initialised and we're currently in the VT */
|
||||
if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) {
|
||||
if (enable && dev->inited && dev->startup && xf86VTOwner()) {
|
||||
OsBlockSignals();
|
||||
EnableDevice(dev, TRUE);
|
||||
if (!dev->enabled) {
|
||||
|
|
|
@ -274,7 +274,7 @@ xf86OpenConsole(void)
|
|||
* this is to make sure we don't continue until the activate
|
||||
* signal is received.
|
||||
*/
|
||||
if (!xf86Screens[0]->vtSema)
|
||||
if (!xf86VTOwner())
|
||||
sleep(5);
|
||||
}
|
||||
#endif /* HAS_USL_VTS */
|
||||
|
|
Loading…
Reference in New Issue