Skip to content

Commit

Permalink
Prevent trust dialogs from being hidden behind the application window
Browse files Browse the repository at this point in the history
Use SWT.ON_TOP for the shell in order to keep the dialogs visible,
because generally the user cannot proceed with their activity
(update/install) until the dialog is completed.

A modal dialog is avoided because these dialogs are asynchronously
opened from a background job, which blocks, so there is no knowing what
UI activity might currently be under way.

eclipse-oomph/oomph#11
  • Loading branch information
merks committed Oct 12, 2023
1 parent 48e7f27 commit bc8eb82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class TrustAuthorityDialog extends SelectionDialog {
public TrustAuthorityDialog(Shell parentShell, Object input) {
super(parentShell);

setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | SWT.MAX | getDefaultOrientation());
setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | SWT.MAX | SWT.ON_TOP | getDefaultOrientation());

if (input instanceof TreeNode[] nodes) {
init(null, nodes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class TrustCertificateDialog extends SelectionDialog {
public TrustCertificateDialog(Shell parentShell, Object input) {
super(parentShell);

setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | SWT.MAX | getDefaultOrientation());
setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | SWT.MAX | SWT.ON_TOP | getDefaultOrientation());

if (input instanceof TreeNode[]) {
init(null, (TreeNode[]) input);
Expand Down

0 comments on commit bc8eb82

Please sign in to comment.