When you activate a Shell (usually via the open()
method), SWT asks the window manager on your given platform to make the shell active. However, depending on the window manager, the shell might not become the top-most shell on the desktop. Here's an article with some interesting info about opening shells (see section "11.4.6 Opening a Shell").
If this is the cause of your issue, you may be able to use the forceActive()
method of the Shell class to force the shell to become active. However, depending on your application, you may not want to adopt this approach. The following is a warning from the article:
Most Programs Should Never Need to Use
forceActive()
Forcing a shell to be active should be
reserved for those occasions when you
must get the attention of the user
(which is almost never). After all, do
you like it when another window steals
your keystrokes?