SWT modal dialog overlapped by non-modal dialog on Mac OS X [message #1574429] |
Tue, 20 January 2015 03:04  |
Eclipse User |
|
|
|
Greetings,
In our application we open a non-modal MessageDialog
with shellstyle: SWT.MODELESS | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX and blockOnOpen: false
The parent-shell is obtained by PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().
The dialog seems to overlap modal dialogs. For this case, we search for open modal shells while the dialog opens and call forceActive() on a found shell to bring it back to the front.
This seems to work on windows and linux but does nothing visible on Mac OS X.
It does not even work manually. For example: Open the message-dialog while the preferences are open.
On Mac OS X it is not possible to bring the preference-page back to the front, the user will always have to drag the dialog away.
Any ideas?
Thanks in advance,
Daniel
|
|
|
|
|
Re: SWT modal dialog overlapped by non-modal dialog on Mac OS X [message #1576953 is a reply to message #1575466] |
Wed, 21 January 2015 11:28  |
Eclipse User |
|
|
|
I like to think of the parent shells as providing the window system a set of constraints for ordering. Basically by using the active window for your other dialog, you're saying to the window system that it's as important as any other dialogs specifying the active window.
If you want to ensure your dialog is on top of your top-most dialog, find your top-most dialog and specify it as your dialog parent. Don't use the active window (btw: realize that getActiveWorkbenchWindow() can return null). You could even consider Display.getActiveShell().
It sounds like you have particular semantics for this dialog, especially as to how it relates to other dialogs, but it's not clear what they are.
Brian.
|
|
|
Powered by
FUDForum. Page generated in 0.10410 seconds