On Mon, Oct 20, 2008 at 10:19 AM, Martin Schreiber <[EMAIL PROTECTED]> wrote: > [...] > You could send a wakeup message to the X event queue if a widget has been > invalidated instead of polling. See MSEgui lib/common/msegui.pas > tguiapplication.invalidated and the postevent infrastructure for an example.
Thanks Martin. I take it, your method would be a bit more efficient than polling? Or wouldn't it make much difference because the event loop keeps looping anyway? For example: Using the wakeup event, it will simply break out of the message handling a bit quicker. "if XPending(display) > 0" would have a "else" part where it fires the OnIdle event and then breaks out. Skipping (or making redundant) the "if needToWait ..." block of code. Either way, I like your idea. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal