The fix for the SCO OpenServer (Bugz.: 470) contains a piece -see below - that fixes the VT switching for OS that start numbering their VTs with 0 instead of 1. This seems to be the case on the open server but also on SUN i386 (not Solaris 8) platforms. The code changes also affect these platforms - however the vtno-- (to reduce the VT number passed to the function by one as XFree86 starts its numbering with 1) seems only to matter for OpenServer.
Could somebody who has access to such a system please test and comment? Egbert. Index: programs/Xserver/hw/xfree86/common/xf86Events.c =================================================================== RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v retrieving revision 3.152 diff -u -r3.152 xf86Events.c --- programs/Xserver/hw/xfree86/common/xf86Events.c 2003/06/18 13:35:28 3.152 +++ programs/Xserver/hw/xfree86/common/xf86Events.c 2003/07/04 14:01:39 @@ -323,6 +323,9 @@ case ACTION_SWITCHSCREEN: if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) { int vtno = *((int *) arg); +#ifdef SCO + vtno--; +#endif #if defined(QNX4) xf86Info.vtRequestsPending = vtno; #else @@ -333,17 +336,18 @@ break; case ACTION_SWITCHSCREEN_NEXT: if (VTSwitchEnabled && !xf86Info.dontVTSwitch) { - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0) #if defined(SCO) || (defined(sun) && defined (i386) && defined (SVR4)) + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0) if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 0) < 0) #else + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0) if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) < 0) #endif ErrorF("Failed to switch consoles (%s)\n", strerror(errno)); } break; case ACTION_SWITCHSCREEN_PREV: - if (VTSwitchEnabled && !xf86Info.dontVTSwitch) { + if (VTSwitchEnabled && !xf86Info.dontVTSwitch && xf86Info.vtno > 0) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno - 1) < 0) ErrorF("Failed to switch consoles (%s)\n", strerror(errno)); } @@ -762,9 +766,6 @@ int vtno = specialkey - KEY_F1 + 1; if (specialkey == KEY_F11 || specialkey == KEY_F12) vtno = specialkey - KEY_F11 + 11; -#ifdef SCO325 - vtno--; -#endif if (down) xf86ProcessActionEvent(ACTION_SWITCHSCREEN, (void *) &vtno); return; _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel