|Restoring the active shell in SwtInputBlocker does not work properly [message #11015]
||Tue, 26 May 2009 14:46
| Dominik Kaspar
Registered: July 2009
If the SwtInputBlocker is used for a modal awt dialog it tries to restore |
the last active shell when the awt dialog closes. This is done because
windows from other applications could be openeded during SWT was being
blocked (SwtInputBlocker line 116).
When the method block(AwtDialogListener dialogListener) is called the
SwtInputBlocker tries to remember the active shell. This fails because
display.getActiveShell() does mostly return null. In this case the first
shell will be taken from the display. If you work with more than 1 shell
at the same time and you open/close a swing dialog, always the first shell
from the display gets the focus not the original parent.
I added a SWT.Activate listener to the display in the AwtDialogListener to
remember the last active shell. Any better solutions?
Another problem is if you start a complete new awt window, lets say for
JasperReports, from a swt context and open a new awt modal dialog from
there, if you close the awt dialog the swt shell gets the focus not the
awt window from JasperReports which was the parent.
Powered by FUDForum
. Page generated in 0.01944 seconds