[fpc-pascal] Timer in X11

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Dec 22 12:55:14 CET 2011


On Thu, Dec 22, 2011 at 11:04 AM, zeljko <zeljko at holobit.net> wrote:
> I would try with it before reinventing wheel, because it works on all X11
> platforms (even on OS/2 and BeOS) and I'm pretty sure that it's installed by
> default.

Interresting, but I don't think it will be necessary ... in rev 34359
I commited support for XAddConnectionWatch =D And I also don't like
very much gnome APIs, although it could be added as an alternative via
ifdefs if someone wants to go down this path.

But I could not fix OnIdle to adere to the Delphi specification
because that would affect assync call handling since there is only an
TApplication.Idle event which handles both. LCL-Gtk2 fires OnIdle like
a machine gun in a program with a timer, and I don't know if this is
correct or not, it would be good if someone with Delphi could test. If
it isn't correct or ideal then maybe we need a
TApplication.PartialIdle (called by Idle too to keep compatibility) to
handle things like AssynCall. I don't know where the hint update
belongs to, PartialIdle or Idle

The 1 second timeout needs to be kept anyway, because another thread
could queue an assync call, so we need to check that periodically.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list