Index: linux/lnx_init.c ================================================================================ --- linux/lnx_init.c +++ linux/lnx_init.c @@ -230,9 +230,6 @@ { struct termios nTty; -#if defined(DO_OS_FONTRESTORE) - lnx_savefont(); -#endif /* * now get the VT. This _must_ succeed, or else fail completely. */ @@ -244,6 +241,10 @@ FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n", strerror(errno)); +#if defined(DO_OS_FONTRESTORE) + lnx_savefont(); +#endif + if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) FatalError("xf86OpenConsole: VT_GETMODE failed %s\n", strerror(errno)); @@ -353,6 +354,11 @@ if (VTSwitch) { +#if defined(DO_OS_FONTRESTORE) + if (xf86Info.vtno == vtno) /* check if we are active */ + lnx_restorefont(); + lnx_freefontdata(); +#endif /* * Perform a switch back to the active VT when we were started */ @@ -367,11 +373,6 @@ activeVT = -1; } -#if defined(DO_OS_FONTRESTORE) - if (xf86Info.vtno == vtno) /* check if we are active */ - lnx_restorefont(); - lnx_freefontdata(); -#endif } close(xf86Info.consoleFd); /* make the vt-manager happy */ --- shared/VTsw_usl.c +++ shared/VTsw_usl.c @@ -62,15 +62,15 @@ xf86VTSwitchAway(void) { xf86Info.vtRequestsPending = FALSE; +#ifdef OSSWITCHAWAY + OSSWITCHAWAY; +#endif if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) { return(FALSE); } else { -#ifdef OSSWITCHAWAY - OSSWITCHAWAY; -#endif return(TRUE); } }