7 #include <X11/extensions/scrnsaver.h>
12 static XScreenSaverInfo
*mit_info
;
16 mit_info
= XScreenSaverAllocInfo();
17 if((display
=XOpenDisplay(NULL
)) == NULL
) { return(-1); }
18 screen
= DefaultScreen(display
);
19 XScreenSaverQueryInfo(display
, RootWindow(display
,screen
), mit_info
);
20 idle_time
= (mit_info
->idle
) / 1000;
22 XCloseDisplay(display
);
28 int idle
= GetIdleTime();
29 if(idle
== -1) return 1;