Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » [GTK] MessageBox created behind creating dialog
[GTK] MessageBox created behind creating dialog [message #1746191] Mon, 24 October 2016 20:02 Go to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1556
Registered: January 2014
Senior Member

When I have some model interaction (e.g., ProgressMonitor) and I want to inform the user about issues with a message box on GTK this message box is created behind the progress bar. I use the following code for creating the message box:
MessageBox messageBox = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.ICON_ERROR | SWT.OK);


I noticed that in other use cases in the IDE this happens also for other dialogs which pop up a message dialog that there also the message dialog is not in front. Can this be handled programmatically or does it need a fix in SWT?
Re: [GTK] MessageBox created behind creating dialog [message #1746219 is a reply to message #1746191] Tue, 25 October 2016 13:33 Go to previous messageGo to next message
Eclipse UserFriend
You're specifying the window's shell whereas your active shell is a dialog. You should likely be parenting your message box using the display's active shell (Display#getActiveShell()).
Re: [GTK] MessageBox created behind creating dialog [message #1746231 is a reply to message #1746219] Tue, 25 October 2016 17:45 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1556
Registered: January 2014
Senior Member

The problem is that Display.getDefault().getActiveShell() gives me null at this point. This was the reason to switch to the workbench solution.
Previous Topic:Rendering of font Roboto Medium seems to be broken with antialiasing != SWT.DEFAULT
Next Topic:macOS Sierra 10.12: Error on initializing Display with swt 4.6
Goto Forum:
  


Current Time: Tue Mar 19 08:17:38 GMT 2024

Powered by FUDForum. Page generated in 0.02449 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top