system idle? / getting XEvents
- From: linas linas org (Linas Vepstas)
- To: gtk-list gnome org
- Cc: linas linas org
- Subject: system idle? / getting XEvents
- Date: Sat, 8 Sep 2001 00:26:33 -0500 (CDT)
Hi,
Double question here:
1) is anyone working on any sort of thingy that will tell me if/how
long the keyboard/mouse has been idle? I want to add a feature
to the gtt (gnome time tracker) that will turn it off after a period
of inactivity.
2) To do the above, I started porting Jamie Zawinski's xscreensaver
idle detection code to gdk, but got stumped. If the x server does not
have the xidle extension (seems xfree86 doesn't), then it listens
for XKeyboard/XPointer XEvents from *all* windows on the screen.
Problem: there seems to be no polite way of getting gdk to give me the
XEvent. (there is no analog of XtNextEvent). I suppose I could just
XCheckIfEvent now that I think about it, but it could be hairy, and
I thought maybe one of the gdk developers could recommend a better way
...
--linas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]