diff options
author | Fredrik Höglund <fredrik@kde.org> | 2007-01-03 21:05:35 +0100 |
---|---|---|
committer | Fredrik Höglund <fredrik@kde.org> | 2007-01-03 21:05:35 +0100 |
commit | 3b5b7ef5c2ab1d196806f6359e0972fd78d204dd (patch) | |
tree | 22f93234b1584e81e1f9afaee4b0338a77b1a916 /mi | |
parent | 953a9ef949b4c57d28daeec57031fe1ce368c27c (diff) |
Move the code for resetting the DPMS mode in response to input events,
from WaitForSomething to mieqProcessInputEvents.
mieqProcessInputEvents already handles resetting the screen saver.
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mieq.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -52,6 +52,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 { @@ -183,6 +189,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. */ |