2009-08-04 21:52:16 +02:00
|
|
|
Index: linux/lnx_init.c
|
2010-01-18 14:04:02 +01:00
|
|
|
================================================================================
|
|
|
|
--- linux/lnx_init.c
|
2009-08-04 21:52:16 +02:00
|
|
|
+++ linux/lnx_init.c
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -230,9 +230,6 @@
|
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
|
|
|
*/
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -244,6 +241,10 @@
|
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));
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -353,6 +354,11 @@
|
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
|
|
|
|
*/
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -367,11 +373,6 @@
|
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 */
|
|
|
|
|
2010-01-18 14:04:02 +01:00
|
|
|
--- shared/VTsw_usl.c
|
2009-08-04 21:52:16 +02:00
|
|
|
+++ shared/VTsw_usl.c
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -62,15 +62,15 @@
|
|
|
|
xf86VTSwitchAway(void)
|
2009-08-04 21:52:16 +02:00
|
|
|
{
|
|
|
|
xf86Info.vtRequestsPending = FALSE;
|
|
|
|
+#ifdef OSSWITCHAWAY
|
|
|
|
+ OSSWITCHAWAY;
|
|
|
|
+#endif
|
|
|
|
if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
|
|
|
|
{
|
|
|
|
return(FALSE);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
-#ifdef OSSWITCHAWAY
|
|
|
|
- OSSWITCHAWAY;
|
|
|
|
-#endif
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
}
|