diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-05-19 23:26:31 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-19 15:34:54 -0700 |
commit | 78f946c297081d39d312e05928146c78f59fedcb (patch) | |
tree | d9e68e99b2635b4b186a4c1e133aa3ad22ed1dac /hw | |
parent | 7e127f12a24acb8f43055af0a9be1ec585bbed36 (diff) |
sun_init.c: Implement novtswitch & sharevts for Solaris
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: John Martin <john.m.martin@oracle.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/os-support/solaris/sun_init.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c index d8c897d43..800fc1c3d 100644 --- a/hw/xfree86/os-support/solaris/sun_init.c +++ b/hw/xfree86/os-support/solaris/sun_init.c @@ -186,6 +186,11 @@ xf86OpenConsole(void) xf86Info.vtno = VTnum; from = X_CMDLINE; } + else if (xf86Info.ShareVTs) + { + xf86Info.vtno = vtinfo.v_active; + from = X_CMDLINE; + } else { if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || @@ -217,6 +222,9 @@ OPENCONSOLE: chown(consoleDev, getuid(), getgid()); #ifdef HAS_USL_VTS + if (xf86Info.ShareVTs) + return; + if (vtEnabled) { /* @@ -261,12 +269,13 @@ OPENCONSOLE: else /* serverGeneration != 1 */ { #ifdef HAS_USL_VTS - if (vtEnabled) + if (vtEnabled && !xf86Info.ShareVTs) { /* * Now re-get the VT */ - switch_to(xf86Info.vtno, "xf86OpenConsole"); + if (xf86Info.autoVTSwitch) + switch_to(xf86Info.vtno, "xf86OpenConsole"); #ifdef VT_SET_CONSUSER /* added in snv_139 */ if (strcmp(display, "0") == 0) @@ -355,7 +364,8 @@ xf86CloseConsole(void) } /* Activate the VT that X was started on */ - switch_to(xf86StartVT, "xf86CloseConsole"); + if (xf86Info.autoVTSwitch) + switch_to(xf86StartVT, "xf86CloseConsole"); } #endif /* HAS_USL_VTS */ |