Re: system idle? / getting XEvents
- From: Havoc Pennington <hp redhat com>
- To: linas linas org (Linas Vepstas)
- Cc: gtk-list gnome org
- Subject: Re: system idle? / getting XEvents
- Date: 10 Sep 2001 15:09:42 -0400
linas linas org (Linas Vepstas) writes:
> 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.
I'd say copy xscreensaver... which you did:
> 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
> ...
Install an event filter (gdk_window_add_filter), pass NULL for the
window argument to get all windows.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]