summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Events.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/common/xf86Events.c')
-rw-r--r--hw/xfree86/common/xf86Events.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 791fd2673..d61d4d67a 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.3 2004/07/30 20:56:53 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
@@ -403,7 +409,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
/* */
/* otherwise fallback to sending a key event message to */
/* the current screen's driver: */
- if (*pScr->HandleMessage) {
+ if (*pScr->HandleMessage != NULL) {
(void) (*pScr->HandleMessage)(pScr->scrnIndex,
"KeyEventMessage", message, &retstr);
}
@@ -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);