summaryrefslogtreecommitdiff
path: root/mi/mieq.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-01-28 17:18:57 +1030
committerPeter Hutterer <whot@hyena.localdomain>2007-01-28 17:18:57 +1030
commit15a81b6325d359990017b8e9f17ce18a7eff1354 (patch)
treec1709b4d65e052be7dbfbb1c2d96cb2b99d6d884 /mi/mieq.c
parent3759254c0967ae83bdcbf097d9e8a58733c8e6f9 (diff)
parentcc3d66d4a53fee8f1d940bb8c7f032c94b9c25f6 (diff)
Merge branch 'master'
Diffstat (limited to 'mi/mieq.c')
-rw-r--r--mi/mieq.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index b336277d4..478b61ef0 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -59,6 +59,12 @@ in this Software without prior written authorization from The Open Group.
# include "extinit.h"
# include "exglobals.h"
+#ifdef DPMSExtension
+# include "dpmsproc.h"
+# define DPMS_SERVER
+# include <X11/extensions/dpms.h>
+#endif
+
#define QUEUE_SIZE 256
typedef struct _Event {
@@ -193,6 +199,13 @@ mieqProcessInputEvents()
while (miEventQueue.head != miEventQueue.tail) {
if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset);
+#ifdef DPMSExtension
+ else if (DPMSPowerLevel != DPMSModeOn)
+ SetScreenSaverTimer();
+
+ if (DPMSPowerLevel != DPMSModeOn)
+ DPMSSet(DPMSModeOn);
+#endif
e = &miEventQueue.events[miEventQueue.head];
/* Assumption - screen switching can only occur on motion events. */