Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] readAndDispatch() and PaintEvent

Hi,

Anyone to shed light on my previous message? (see below)

Cheers,
-Christopher

---------- Original message ----------

Hi,

I was looking at snippet 104 (win32 port) that shows a Splash Screen.
I noticed these behaviours:
- The splash screen updates (repaints) itself though we are not
dispatching the event queue.
- If we attach a Paint listener to one of the components (like the
progress bar), then PaintEvents are generated though we are not
dispatching the queue.

I thought it was mandatory to dispatch the queue to get events. Is
this wrong? Or are there some exceptions for some specific events?

Additionaly, I noticed that setting the selection on the progress bar
synchronously generates the low level paint events which synchronously
triggers repainting and the call to the paint listeners. So the splash
screen relies on this to actually render the progress of the progress
bar.
Now the problem I have is that the platform for which I am making the
port asynchronously handle paint updates. That means, if we don't
dispatch the queue, then we don't get the paint updates. Or I can call
the paint listeners, but not in the event thread.

Is there something I am missing, or could you give more details about
these dispatching rules and restrictions?

Cheers,
-Christopher


Back to the top