[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] Idle events



There is a comment somewhere in the code (or possibly in the idle
handling document) that mentions something along these lines and I think
it says that there is no need to do anything special as there always
will be an event of some kind very soon after (e.g. a button will get
updated or the view will be redrawn etc).  It does sound slightly dodgy
to rely on this though it does seem to work pretty well (unless you know
different).  Maybe we should call wxWakeUpIdle when adding a new handler
to be on the safe side...

Gerry

-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Alex Bligh
Sent: 16 May 2006 20:06
To: xara-dev
Cc: Alex Bligh
Subject: [XaraXtreme-dev] Idle events

I am having difficulty understanding how idle events are meant to work
using App::RegisterIdleHandler

If the app is completely idle (nothing going on, for instance because
the previous idle handlers all returned FALSE), wxWidgets will not
be sending idle events in, because nothing called RequestMore().

If, at that point, another (kernel) idle handler is added that wants
more idle events, it seems to me it won't get them, because nothing
has called wxWakeUpIdle(). Of course when the next event comes
through, everything will be sorted.

Unless I'm misunderstanding how the whole thing works (quite possible)
I think we have a bug in our idle handling.

Any comments?

Alex