Thanks.  I tried the implementation and the CPU hit was not too severe.  Still, 
as it turns out, I used a different approach entirely.  I created another 
thread and had it block read on one end of a pipe.  As such, the processing 
does not happen in my "main loop" but that's OK for what I'm doing.
 
Cheers,
Gil

________________________________

From: Greg Haerr [mailto:[EMAIL PROTECTED]
Sent: Fri 9/5/2008 10:01 PM
To: Kees Schoenmakers; nanogui@linuxhacker.org
Cc: Gil Glass
Subject: Re: [nanogui] Difficulty Using GrInjectKeyboardEvent()



: This makes the application active contineously while checking for events
to
: handle when it has time to.

The problem with this approach is that the application polls and uses
cpu time continuously.  This may work if only one application is running
but quickly becomes a bad design if multiple applications run using
the same approach.

Regards,

Greg



Reply via email to