mirror of https://github.com/BOINC/boinc.git
Merge pull request #1478 from aggroskater/reinstate_xss_idle_detection_linux
XSS Idle Detection Bugfix (XCloseDisplay)
This commit is contained in:
commit
5ade036b3a
|
@ -2090,6 +2090,7 @@ bool xss_idle(long idle_threshold) {
|
||||||
"[idle_detection] XScreenSaver extension not available for DISPLAY '%s'.",
|
"[idle_detection] XScreenSaver extension not available for DISPLAY '%s'.",
|
||||||
it->c_str());
|
it->c_str());
|
||||||
}
|
}
|
||||||
|
XCloseDisplay(disp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2098,6 +2099,9 @@ bool xss_idle(long idle_threshold) {
|
||||||
XScreenSaverQueryInfo(disp, DefaultRootWindow(disp), xssInfo);
|
XScreenSaverQueryInfo(disp, DefaultRootWindow(disp), xssInfo);
|
||||||
idle_time = xssInfo->idle;
|
idle_time = xssInfo->idle;
|
||||||
|
|
||||||
|
// Close the connection to the XServer
|
||||||
|
XCloseDisplay(disp);
|
||||||
|
|
||||||
// convert from milliseconds to seconds
|
// convert from milliseconds to seconds
|
||||||
idle_time = idle_time / 1000;
|
idle_time = idle_time / 1000;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue