Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] setVisible(true) from a worker thread


There must be a restriction on one of the other windowing systems.  There are multiple implementations of SWT so the win32 implementation may not make sense by itself.



Reshat Sabiq <sabiq@xxxxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

04/13/2006 02:27 PM

Please respond to
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] setVisible(true) from a worker thread





I know that it throws, and that it must be called from the UI thread
that instantiated the window, but i'm trying to understand why this
restriction exists. Doesn't this method send a message like WM_SHOWWINDOW
on Windows to the thread that created the window behind the scenes? Or
does it change the window state and the message loop is notified of
the change that has already been processed (is this synchronous or
asynchronous?), while the window state change is processed
synchronously on the calling thread?

Given that there is no restriction on which thread calls ShowWindow on
Windows, why does setVisible have to be called on the UI thread in SWT?

I'm just trying to understand the implementation a little better.

Thanks.

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top