client: Remove Display Power Management query for idle detection until a new variant can be found.

This commit is contained in:
Rom Walton 2013-05-22 12:00:22 -04:00
parent 6edc792baf
commit 514484e022
1 changed files with 0 additions and 39 deletions

View File

@ -1832,45 +1832,6 @@ bool xss_idle(long idle_treshold) {
idle_time = xssInfo->idle; idle_time = xssInfo->idle;
#if HAVE_DPMS
int dummy;
CARD16 standby, suspend, off;
CARD16 state;
BOOL onoff;
if (DPMSQueryExtension(disp, &dummy, &dummy)) {
if (DPMSCapable(disp)) {
DPMSGetTimeouts(disp, &standby, &suspend, &off);
DPMSInfo(disp, &state, &onoff);
if (onoff) {
switch (state) {
case DPMSModeStandby:
/* this check is a littlebit paranoid, but be sure */
if (idle_time < (unsigned) (standby * 1000)) {
idle_time += (standby * 1000);
}
break;
case DPMSModeSuspend:
if (idle_time < (unsigned) ((suspend + standby) * 1000)) {
idle_time += ((suspend + standby) * 1000);
}
break;
case DPMSModeOff:
if (idle_time < (unsigned) ((off + suspend + standby) * 1000)) {
idle_time += ((off + suspend + standby) * 1000);
}
break;
case DPMSModeOn:
default:
break;
}
}
}
}
#endif
// convert from milliseconds to seconds // convert from milliseconds to seconds
idle_time = idle_time / 1000; idle_time = idle_time / 1000;