Set DPMS to ON when VT switching away or shutting down the server. Failing

to do this may leave the text console blank.
This commit is contained in:
Egbert Eich 2004-07-30 20:56:53 +00:00
parent 40b975e3ac
commit bbfe7bed3f
3 changed files with 25 additions and 2 deletions

View File

@ -118,6 +118,10 @@ DPMSClose(int i, ScreenPtr pScreen)
pScreen->CloseScreen = pDPMS->CloseScreen;
if (xf86Screens[i]->DPMSSet) {
xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
}
xfree((pointer)pDPMS);
pScreen->devPrivates[DPMSIndex].ptr = NULL;
if (--DPMSCount == 0)

View File

@ -49,7 +49,7 @@
*/
/* $XConsortium: xf86Events.c /main/46 1996/10/25 11:36:30 kaleb $ */
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 1.1.4.3 2003/12/06 13:24:24 kaleb Exp $ */
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 1.2 2004/04/23 19:20:32 eich Exp $ */
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
@ -95,6 +95,12 @@
extern Bool noXkbExtension;
#endif
#ifdef DPMSExtension
#define DPMS_SERVER
#include "extensions/dpms.h"
#include "dpmsproc.h"
#endif
#define XE_POINTER 1
#define XE_KEYBOARD 2
@ -1348,7 +1354,11 @@ xf86VTSwitch()
#endif /* !__UNIXOS2__ */
xf86EnterServerState(SETUP);
for (i = 0; i < xf86NumScreens; i++) {
xf86Screens[i]->LeaveVT(i, 0);
#ifdef DPMSExtension
if (xf86Screens[i]->DPMSSet)
xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
#endif
xf86Screens[i]->LeaveVT(i, 0);
}
for (ih = InputHandlers; ih; ih = ih->next)
xf86DisableInputHandler(ih);

View File

@ -93,6 +93,11 @@
extern int xtest_command_key;
#endif /* XTESTEXT1 */
#ifdef DPMSExtension
#define DPMS_SERVER
#include "extensions/dpms.h"
#endif
/* forward declarations */
@ -1246,6 +1251,10 @@ AbortDDX()
* screen explicitely.
*/
xf86EnableAccess(xf86Screens[i]);
#ifdef DPMSExtension
if (xf86Screens[i]->DPMSSet)
xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
#endif
(xf86Screens[i]->LeaveVT)(i, 0);
}
}