diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 980f38d25..4c59adba7 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -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)); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 1695dbf74..91ec4c8bb 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -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 diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index bee407bf9..26c03c6c3 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -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) { diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c index 4b75a98ac..68527a577 100644 --- a/hw/xfree86/os-support/solaris/sun_init.c +++ b/hw/xfree86/os-support/solaris/sun_init.c @@ -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 */