Index: shared/VTsw_usl.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/shared/VTsw_usl.c,v retrieving revision 1.5 diff -u -r1.5 VTsw_usl.c --- shared/VTsw_usl.c 3 Jul 2005 07:01:35 -0000 1.5 +++ shared/VTsw_usl.c 29 Jun 2006 09:33:05 -0000 @@ -64,15 +64,15 @@ xf86VTSwitchAway() { xf86Info.vtRequestsPending = FALSE; +#ifdef OSSWITCHAWAY + OSSWITCHAWAY; +#endif if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) { return(FALSE); } else { -#ifdef OSSWITCHAWAY - OSSWITCHAWAY; -#endif return(TRUE); } } --- linux/lnx_init.c.orig 2009-02-27 15:41:39.000000000 +0100 +++ linux/lnx_init.c 2009-02-27 15:41:47.000000000 +0100 @@ -252,9 +252,6 @@ xf86OpenConsole(void) { struct termios nTty; -#if defined(DO_OS_FONTRESTORE) - lnx_savefont(); -#endif /* * now get the VT. This _must_ succeed, or else fail completely. */ @@ -266,6 +263,10 @@ xf86OpenConsole(void) 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)); @@ -384,6 +385,11 @@ xf86CloseConsole() 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 */ @@ -398,11 +404,6 @@ xf86CloseConsole() 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 */