[ohm] monitoring INPUT state
Ross Burton
ross at burtonini.com
Fri Jun 29 04:16:32 PDT 2007
On Fri, 2007-06-29 at 12:06 +0100, Richard Hughes wrote:
> On Fri, 2007-06-29 at 12:01 +0100, Ross Burton wrote:
> > Really new X servers have an inactivity counter maintained in the
> > server.
>
> Okay, sounds like problem solved. Can I query X inactivity (do you know
> the API name?) from a system daemon or does this have to go through the
> session?
It would have be to be done at the session level, although OLPC only has
a single session and a single user, so the system daemon could connect
to the X server.
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=7e2c935920cafadbd87c351f1a3239932864fb90 is the commit you'll want. It was only added to git 5 weeks ago so it you would want to check for its existance, and get it added to your X server.
The relevant API is X11/extensions/sync.h. I believe you get the
IDLETIME counter, and then set an alarm for it to go off after five
minutes. At least that's how I think it works. :)
Ross
--
Ross Burton mail: ross at burtonini.com
jabber: ross at burtonini.com
www: http://www.burtonini.com./
PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF
More information about the Ohm-devel
mailing list