Re: system idle? / getting XEvents



On Tue, Sep 11, 2001 at 12:07:00PM -0400, Havoc Pennington was heard to remark:
> 
> linas linas org (Linas Vepstas) writes: 
> > ... anyone care to add this as a standard gdk feature? 
> 
> You could file an RFE bug perhaps.
OK, done.

>  
> > And this will get me events for *all* windows on the screen, not just my
> > app windows?   And, as new windows are created by other apps, I'll get 
> > keystroke events from them as well ?
> 
> No, it will get events for all windows GDK knows about. You'll have to
> explicitly select for events on windows you care about
> (gdk_window_foreign_new(), gdk_window_set_events()).

OK, obviates the point. Currently, I use XQueryTree to get *all*
children of the root window.  To import these into gdk, and then 
use gdk filters, is just moe work, not less.

> GDK certainly doesn't do that by default, it would be enormously
> inefficient.

inefficient, maybe, but CPU-usage-wise, the blip's invisible,
at least on my system, where I have several dozen X apps running 
at once ...

BTW, if one had the XIdle extension in place, then it would be a very
small wrapper around this extension (my xfree doesn't seem to have
this extension, though). XIdle detects keyboard/mouse inactivity.

--linas




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]