mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 09:32:51 +00:00
Small spelling/cleanup fixes for UTILITIES/x11idle.c
This commit is contained in:
parent
f250f6beba
commit
f79a477cc4
|
@ -8,7 +8,6 @@
|
||||||
* path
|
* path
|
||||||
*/
|
*/
|
||||||
main() {
|
main() {
|
||||||
Status querry = 0;
|
|
||||||
XScreenSaverInfo *info = XScreenSaverAllocInfo();
|
XScreenSaverInfo *info = XScreenSaverAllocInfo();
|
||||||
//open the display specified by the DISPLAY environment variable
|
//open the display specified by the DISPLAY environment variable
|
||||||
Display *display = XOpenDisplay(0);
|
Display *display = XOpenDisplay(0);
|
||||||
|
@ -18,15 +17,12 @@ main() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//X11 is running, retrieve and print idle time
|
//X11 is running, try to retrieve info
|
||||||
querry = XScreenSaverQueryInfo(display, DefaultRootWindow(display), info);
|
if (XScreenSaverQueryInfo(display, DefaultRootWindow(display), info) == 0) {
|
||||||
|
|
||||||
if (querry == 0) {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//idle time was retrieved successfully, print it
|
//info was retrieved successfully, print idle time
|
||||||
printf("%u\n", info->idle);
|
printf("%u\n", info->idle);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue