idle detection

Mark Doliner mark at kingant.net
Thu Jul 26 03:55:21 EDT 2007


On Wed, 25 Jul 2007 16:39:55 -0700, Sean Egan wrote
> It seems like perhaps the best thing to do is to make the IDLEMARK
> constant, currently set to 10 minutes, use the value set in that
> preference instead, and poll that frequently when not idle. When we
> are idle, we should poll very frequently (once a second, even?) to
> make sure we come back as soon as possible.

That sounds good to me.  I think 2 or 3 seconds would be better than 1.

> Is polling the only way to determine idle time?

I've wondered that for a very long time.  The only promising lead I've seen is
Daniel Stone's comment #20 on f.d.o bug number 1419.  It reads, "IDLE is
fundamentally the wrong approach, since a polling-based API is not very
useful.  fredrikh committed a new idle sync counter to xserver's git master,
which doesn't require any new extensions, requests, or events, and allows you
to avoid polling."

https://bugs.freedesktop.org/show_bug.cgi?id=1419#c20

That comment was from May, so I'm guessing the changes haven't made it into a
public release yet.  It looks like we'll have to poll for now, and later we
can add support for that idle sync counter thing if the user is using a new
enough xserver.

-Mark




More information about the Devel mailing list