File p_ia64-console.diff of Package xorg-x11-server

Index: linux/lnx_init.c
===================================================================
--- linux/lnx_init.c.orig
+++ linux/lnx_init.c
@@ -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 */
 
Index: shared/VTsw_usl.c
===================================================================
--- shared/VTsw_usl.c.orig
+++ shared/VTsw_usl.c
@@ -62,15 +62,15 @@ Bool
 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);
 	}
 }
openSUSE Build Service is sponsored by