> On Nov 19, 2015, at 05:49, René J.V. Bertin <[email protected]> wrote:
> 
> Hi,
> 
> X11 provides a mechanism based on XSync alarms that allows one to be notified 
> when there has been a given time without any user input events, and 
> apparently without polling, at least at the application level:
> 
> https://quickgit.kde.org/?p=kidletime.git&a=blob&h=48081c43abc14f930ab2c426b040fa123807f37c&f=src%2Fplugins%2Fxsync%2Fxsyncbasedpoller.cpp&o=plain
> 
> I'm guessing someone here must know how those alarms are implemented in 
> XQuartz, and also to what extent it is feasible to obtain the same kind of 
> notifications on OS X without resorting to some kind of polling of IOKit's 
> HIDIdleTime property?

There's nothing different about the implementation in XQuartz versus other 
DDXs.  It will be based on *X11* input event, not OS X input events.

Regarding doing something similar in OS X, I'm not sure if there's something 
that matches exactly what you're looking for.  A naive approach would be to use 
dispatch_after() to check the idle time at an appropriate time in the future 
(target_idle_time - current_idle_time).

> 
> Thanks,
> René
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> X11-users mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription: 
> https://lists.apple.com/mailman/options/x11-users/jeremyhu%40freedesktop.org
> 
> This email sent to [email protected]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to