idle detection
Ethan Blanton
elb at pidgin.im
Thu Jul 26 10:30:37 EDT 2007
Sean Egan spake unto us the following wisdom:
> 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.
We can do even better than this; when we are not idle, any time we do
something which causes us to *realize* we are not idle (e.g., the
"Pidgin usage" idle callbacks are called), push the timer back for the
entire idle preference period; if that timer expires, and we are not
yet "idle enough", set the timer for the idle preference period minus
our current idle time.
> When we are idle, we should poll very frequently (once a second,
> even?) to make sure we come back as soon as possible.
This is ... distasteful to me, but I really don't know what else to do
about it. This is precisely when we want to be saving the most power.
Can we get buy-in from any desktop environments or screen saver
applications via d-bus or anything? I realize that X11 itself has no
real solution for this just yet. What are the screensavers doing
these days? Do they rely on display capture?
Ethan
--
The laws that forbid the carrying of arms are laws [that have no remedy
for evils]. They disarm only those who are neither inclined nor
determined to commit crimes.
-- Cesare Beccaria, "On Crimes and Punishments", 1764
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20070726/089af446/attachment.sig>
More information about the Devel
mailing list