Idle time tracking in KRunner

Fredrik Höglund fredrik at kde.org
Wed Aug 20 23:52:59 CEST 2008


On Friday 08 August 2008 14:34, Sebastian Kügler wrote:
> On Friday 08 August 2008 14:01:08 Ryan P. Bitanga wrote:
> > 2008/8/8 Sebastian Kügler <sebas at kde.org>:
> > > Wasn't a feature added to Xorg some time ago that basically works like a
> > > signal/slot connection, i.e. you tell X to notify you after n seconds of
> > > idletime, and just install a handler to do whatever you like?
> >
> > Oh really? That would simplify things. Would you happen to know what
> > extension it's in? I'm not really well versed with X.org internals and
> > I haven't seen any code that does this so I'd appreciate being pointed
> > in the right direction :)
> 
> I don't know, but I remember Fredrik H telling me about it.

It was added to the X sync extension in the form of a new system
counter called "IDLETIME". So what you want to do is set an alarm
on that counter and you'll get an event when it reaches a certain value.

The neat thing about this approach is that we were able to add this
feature without adding any new protocol or client side API.

Regards,
Fredrik



More information about the Plasma-devel mailing list