2007-10-03 01:21:25 +02:00
|
|
|
Index: shared/VTsw_usl.c
|
2006-12-18 15:48:26 +01:00
|
|
|
===================================================================
|
2007-10-03 01:21:25 +02:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
2009-03-02 01:19:45 +01:00
|
|
|
--- 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)
|
2006-12-18 15:48:26 +01:00
|
|
|
{
|
2009-03-02 01:19:45 +01:00
|
|
|
struct termios nTty;
|
|
|
|
|
2006-12-18 15:48:26 +01:00
|
|
|
-#if defined(DO_OS_FONTRESTORE)
|
|
|
|
- lnx_savefont();
|
|
|
|
-#endif
|
|
|
|
/*
|
2007-10-03 01:21:25 +02:00
|
|
|
* now get the VT. This _must_ succeed, or else fail completely.
|
2006-12-18 15:48:26 +01:00
|
|
|
*/
|
2009-03-02 01:19:45 +01:00
|
|
|
@@ -266,6 +263,10 @@ xf86OpenConsole(void)
|
2007-10-03 01:21:25 +02:00
|
|
|
FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
|
|
|
|
strerror(errno));
|
|
|
|
|
2006-12-18 15:48:26 +01:00
|
|
|
+#if defined(DO_OS_FONTRESTORE)
|
|
|
|
+ lnx_savefont();
|
|
|
|
+#endif
|
2007-10-03 01:21:25 +02:00
|
|
|
+
|
2006-12-18 15:48:26 +01:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
|
|
|
|
FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
|
|
|
|
strerror(errno));
|
2009-03-02 01:19:45 +01:00
|
|
|
@@ -384,6 +385,11 @@ xf86CloseConsole()
|
2006-12-18 15:48:26 +01:00
|
|
|
|
|
|
|
if (VTSwitch)
|
|
|
|
{
|
|
|
|
+#if defined(DO_OS_FONTRESTORE)
|
2009-03-02 01:19:45 +01:00
|
|
|
+ if (xf86Info.vtno == vtno) /* check if we are active */
|
2006-12-18 15:48:26 +01:00
|
|
|
+ lnx_restorefont();
|
2009-03-02 01:19:45 +01:00
|
|
|
+ lnx_freefontdata();
|
2006-12-18 15:48:26 +01:00
|
|
|
+#endif
|
|
|
|
/*
|
|
|
|
* Perform a switch back to the active VT when we were started
|
|
|
|
*/
|
2009-03-02 01:19:45 +01:00
|
|
|
@@ -398,11 +404,6 @@ xf86CloseConsole()
|
2006-12-18 15:48:26 +01:00
|
|
|
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 */
|
|
|
|
|