Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 376325

Summary: Swing Dialog off a RCP Application goes behind the application having a shell with SWT.ON_TOP.
Product: [Eclipse Project] Platform Reporter: dheivee <dheivee>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: carolynmacleod4, Silenio_Quarti, urmila.bhowmick
Version: 4.2Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
Code and document demonstrating the problem
none
Sample code and Problem description none

Description dheivee CLA 2012-04-09 10:59:39 EDT
Build Identifier: Version: 3.6.0 Build id: I20100608-0911

Java Swing based dialogs normally stay on top of their parent window until dismissed. We are seeing cases where the dialog is sent behind the parent workbench window (or the parent Workbench window is being brought to the ‘top’ and appears in front of the dialog). 
1) This happens when the user uses the candidate selection mechanism of the Microsoft office 2010 IME. 
2) This candidate selection is initiated by pressing the space bar (twice) when entering in the Japanese language and some characters have just been typed.

Our Analysis
We found that the problem is seen with controls where the application has other shells created using SWT.ON_TOP style bit. For example, the above mentioned problem can be reproduced using the Control “CCombo”, which has the popup shell created using SWT style bit SWT.ON_TOP.

  If this style bit is removed, the problem is resolved. So, it has some issue in putting a required shell on top. 


Reproducible: Always

Steps to Reproduce:
Sample program
The attached sample program is a small RCP application with:
•	A View which has a Label and a CCombo
•	A File menu, with menu items – My Dialog and Exit

Steps to reproduce
A)   Install Microsoft Office 2010 IME for japanese input
A)   Launch the sample RCP Application ‘ComboProj’.
V)   Verify that My View is displayed with a combo box
A)   Go to File Menu, and click My Dialog.
V)   Verify that a Dialog titled ‘Swing Dialog’ is opened. 
A)   In the Language Bar, select Japanese, and Input Mode as Hirangana:
A)  Type something in the text field of the Swing Dialog (this should show Japanese characters), and hit the space bar twice
V)   Verify that a drop down with a list of suggestions appear

The dialog goes behind the RCP application as soon as the List of suggestions from Japanese IME is displayed. The dialog only comes on top, when it is selected again.

A - Action: V- Verify
Comment 1 dheivee CLA 2012-04-09 11:06:23 EDT
Created attachment 213751 [details]
Code  and document demonstrating the problem

COntains
1) Eclipse project (ComboProj) that has a view with CCombo and an Swing Dialog
2) A Word document explaining the problem
Comment 2 Carolyn MacLeod CLA 2012-04-11 12:13:01 EDT
Is your attachment a zip? I can't read it. It needs to be attached with the correct attachment type (binary file if it is a zip).

Here is a wild suggestion, for what it's worth...
Do you have a lot of Swing code? If not, then would you consider trying JavaFX instead of Swing? Apparently it works way better with SWT than Swing ever did, because JavaFX and SWT share the same threading model. Also, Oracle is now recommending that applications use JavaFX moving forward. Just FYI.
Comment 3 dheivee CLA 2012-04-13 02:19:03 EDT
Created attachment 213955 [details]
Sample code and Problem description
Comment 4 dheivee CLA 2012-04-13 02:22:55 EDT
(In reply to comment #2)
> Is your attachment a zip? I can't read it. It needs to be attached with the
> correct attachment type (binary file if it is a zip).
> Here is a wild suggestion, for what it's worth...
> Do you have a lot of Swing code? If not, then would you consider trying JavaFX
> instead of Swing? Apparently it works way better with SWT than Swing ever did,
> because JavaFX and SWT share the same threading model. Also, Oracle is now
> recommending that applications use JavaFX moving forward. Just FYI.

Yes, we do have lot of Swing code and want to migrate the code to SWT
Comment 5 Leo Ufimtsev CLA 2017-08-03 12:29:20 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 6 Eclipse Genie CLA 2019-09-09 14:15:41 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.