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

Bug 354266

Summary: child Shell + MODAL style dissappears from Windows ALT+TAB order
Product: [Eclipse Project] Platform Reporter: Martin Spurek <martin.spurek>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: eclipse.felipe, remy.suen
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
a simple test case which i used none

Description Martin Spurek CLA 2011-08-09 11:41:35 EDT
Build Identifier: 3550b

When you have any application shell and create child shell (acting as dialog). Then you try to use usual windows behavior ALT+TAB to switch to another application it starts to be missing onceyou select the application while having this child shell opened. When you try to use ALT+TAB next times then it is not in the available apps.
No matter if you select the application again right away or select some other application then try to return back to our application.
The same behavior i can observe in Windows 7.

Reproducible: Always

Steps to Reproduce:
1. open shell

2. open child shell, with one of following style flags: SWT.PRIMARY_MODAL, SWT.SYSTEM_MODAL, SWT.APPLICATION_MODAL

3. use ALT+TAB as you would want to swith to another windows app, but select again our application while the child modal shell is opened

4.  try to use ALT+TAB again, the application should be already missing
Comment 1 Felipe Heidrich CLA 2011-08-09 16:04:32 EDT
works for me, here are my steps

1. run ControlExample
2. go to shell tab
3. select SWT.SHELL_TRIM, parent, SWT.PRIMARY_MODAL
4. Press create shell
5. Hold ALT
6. Press Tab
7. Hold Shift
8. Press Tab (returns to the control example)
9. Release Shift and ALT

try again, nothing has dissapeared.
Comment 2 Martin Spurek CLA 2011-08-09 16:37:20 EDT
(In reply to comment #1)
> works for me, here are my steps
> 
> 1. run ControlExample
> 2. go to shell tab
> 3. select SWT.SHELL_TRIM, parent, SWT.PRIMARY_MODAL
> 4. Press create shell
> 5. Hold ALT
> 6. Press Tab
> 7. Hold Shift
> 8. Press Tab (returns to the control example)
> 9. Release Shift and ALT
> 
> try again, nothing has dissapeared.

I do not have my app here to extract the exact snippet to (i guess i had also the "tool" style used), however this is not all steps necessary to reproduce the issue. After step 9. try to repeat steps 5-9 again.
br
Martin
Comment 3 Martin Spurek CLA 2011-08-09 16:45:22 EDT
I will try to add the snippet tomorrow.
Comment 4 Martin Spurek CLA 2011-08-10 02:54:51 EDT
Created attachment 201206 [details]
a simple test case which i used

So after I attended more attention creating the snippet the issue seems to be driven by SWT.SHADOW_IN.
Comment 5 Felipe Heidrich CLA 2011-08-10 10:28:49 EDT
I see
but note that SWT.SHADOW_IN is not a valid style bit for Shell (see the doc)
SWT.SHADOW_IN has the same value as SWT.TOOL, and that is bit that is causing the trouble.
The bug is there, but having a modal tool window is not common (low priority).
Comment 6 Lars Vogel CLA 2019-11-14 03:51:36 EST
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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.