[PATCH 2/3] xf86: use new xf86VTOwnwer interface in a few places
Dave Airlie
airlied at gmail.com
Tue Apr 9 23:38:50 PDT 2013
This replaces some previous uses of direct xf86Screens[0] accesses.
Signed-off-by: Dave Airlie <airlied at gmail.com>
---
hw/xfree86/common/xf86Events.c | 2 +-
hw/xfree86/common/xf86Init.c | 2 +-
hw/xfree86/common/xf86Xinput.c | 2 +-
hw/xfree86/os-support/solaris/sun_init.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 980f38d..4c59adb 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 1695dbf..91ec4c8 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 bee407b..26c03c6 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 4b75a98..68527a5 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 */
--
1.8.2
More information about the xorg-devel
mailing list