aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/mi
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-03-17 20:39:28 +0100
committerMihai Moldovan <ionic@ionic.de>2017-03-17 20:39:28 +0100
commit7fd5d934c1e73642e9919aa8dd5124466356fb89 (patch)
tree1942909531fe17bb60bd1e4601d7455b19b5c177 /nx-X11/programs/Xserver/mi
parent6ac805ab4411d3045c99e3ceefe8495ac95d8e15 (diff)
parentf315ae066598d0dc955db081f8d0faf8d358292d (diff)
downloadnx-libs-7fd5d934c1e73642e9919aa8dd5124466356fb89.tar.gz
nx-libs-7fd5d934c1e73642e9919aa8dd5124466356fb89.tar.bz2
nx-libs-7fd5d934c1e73642e9919aa8dd5124466356fb89.zip
Merge branch 'sunweaver-pr/setnotifyfd-ABI' into 3.6.x
Attributes GH PR #331: https://github.com/ArcticaProject/nx-libs/pull/331
Diffstat (limited to 'nx-X11/programs/Xserver/mi')
-rw-r--r--nx-X11/programs/Xserver/mi/mieq.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/mi/mieq.c b/nx-X11/programs/Xserver/mi/mieq.c
index b5d9baa31..fefb222c4 100644
--- a/nx-X11/programs/Xserver/mi/mieq.c
+++ b/nx-X11/programs/Xserver/mi/mieq.c
@@ -43,6 +43,12 @@ in this Software without prior written authorization from The Open Group.
# include "mi.h"
# include "scrnintstr.h"
+#ifdef DPMSExtension
+# include "dpmsproc.h"
+# define DPMS_SERVER
+# include <nx-X11/extensions/dpms.h>
+#endif
+
#define QUEUE_SIZE 256
typedef struct _Event {
@@ -151,6 +157,14 @@ void mieqProcessInputEvents ()
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