Commit 6307e6fc authored by Fredrik Höglund's avatar Fredrik Höglund Committed by Mike Gabriel

Move the code for resetting the DPMS mode in response to input events, from…

Move the code for resetting the DPMS mode in response to input events, from WaitForSomething to mieqProcessInputEvents. Backported from X.org: commit 3b5b7ef5c2ab1d196806f6359e0972fd78d204dd Author: Fredrik Höglund <fredrik@kde.org> Date: Wed Jan 3 21:05:35 2007 +0100 Move the code for resetting the DPMS mode in response to input events, from WaitForSomething to mieqProcessInputEvents. mieqProcessInputEvents already handles resetting the screen saver. Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent 9b934a44
...@@ -43,6 +43,12 @@ in this Software without prior written authorization from The Open Group. ...@@ -43,6 +43,12 @@ in this Software without prior written authorization from The Open Group.
# include "mi.h" # include "mi.h"
# include "scrnintstr.h" # include "scrnintstr.h"
#ifdef DPMSExtension
# include "dpmsproc.h"
# define DPMS_SERVER
# include <nx-X11/extensions/dpms.h>
#endif
#define QUEUE_SIZE 256 #define QUEUE_SIZE 256
typedef struct _Event { typedef struct _Event {
...@@ -151,6 +157,14 @@ void mieqProcessInputEvents () ...@@ -151,6 +157,14 @@ void mieqProcessInputEvents ()
if (screenIsSaved == SCREEN_SAVER_ON) if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset); SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset);
#ifdef DPMSExtension
else if (DPMSPowerLevel != DPMSModeOn)
SetScreenSaverTimer();
if (DPMSPowerLevel != DPMSModeOn)
DPMSSet(DPMSModeOn);
#endif
e = &miEventQueue.events[miEventQueue.head]; e = &miEventQueue.events[miEventQueue.head];
/* /*
* Assumption - screen switching can only occur on motion events * Assumption - screen switching can only occur on motion events
......
...@@ -509,10 +509,6 @@ WaitForSomething(int *pClientsReady) ...@@ -509,10 +509,6 @@ WaitForSomething(int *pClientsReady)
if (XFD_ANYSET(&tmp_set)) if (XFD_ANYSET(&tmp_set))
HandleNotifyFds(); HandleNotifyFds();
#ifdef DPMSExtension
if (XFD_ANYSET (&devicesReadable) && (DPMSPowerLevel != DPMSModeOn))
DPMSSet(DPMSModeOn);
#endif
if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable)) if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable))
break; break;
#ifdef WIN32 #ifdef WIN32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment