diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index df968797c..77b7c0db1 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -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) diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 3a721a33f..204bd9360 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -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); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index d3e36e02c..0fb2d6257 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -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); } }