| Summary: | [Custom Widgets] CCombo: floating list pop-up on ALT+TAB | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Elias Volanakis <elias> | ||||||||||
| Component: | SWT | Assignee: | Lakshmi P Shanmugam <lshanmug> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | carolynmacleod4 | ||||||||||
| Version: | 3.7 | ||||||||||||
| Target Milestone: | 3.7 M6 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows Vista | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
Created attachment 187388 [details]
Snippet
Snippet to reproduce issue
This happens when the cursor is on the arrow button when user does Alt+TAB. In this case the dropdown(false) is not being called. When the cursor is anywhere else (other than on the arrow button) Alt+TAB works fine. Created attachment 188269 [details]
patch
When we get Deactivate event on the pop-up shell, we try to find out if the deactivate happened by clicking on the arrow button. We check if the cursor position is on the arrow button, if so we assume that the user clicked the arrow button and don't call dropdown(false) in this case. But, this assumption fails when the cursor is on the arrow button when deactivate happens with Alt+TAB.
The patch, adds an additional check to see if the activated shell is the Combo shell to make sure that the arrow button was pressed.
Carolyn, can you please review the patch? I have tested the patch on Windows, GTK and Cocoa.
CCombo is wild - I'm glad you tested it on all 3 platforms. :) Why did you need to async? Should cocoa be added to the if (!"carbon".equals(SWT.getPlatform()))? i.e. is the code inside the 'if' needed for cocoa also? When that code was written, we did not have the cocoa platform. There still seems to be something a bit strange (on Windows, anyhow). If I type ALT+TAB to go to another application, and then type ALT+TAB to come back, nothing seems to have keyboard focus. Created attachment 188871 [details]
patch2
(In reply to comment #4) Hi Carolyn, Thanks for the review. > Why did you need to async? I used async so that the I can get the next active shell (getDisplay.getActiveShell()) after the deactivate event completes. The active shell is required to determine if the arrow button was clicked. In the new patch, I have moved the dropdown(false) logic from popuplist's deactivate event to list's focus out event. Now I can get the active shell without using asyncExec(). > Should cocoa be added to the if (!"carbon".equals(SWT.getPlatform()))? > i.e. is the code inside the 'if' needed for cocoa also? When that code was > written, we did not have the cocoa platform. Cocoa behaves same as gtk and windows, hence cocoa shouldn't be added in the above check. > There still seems to be something a bit strange (on Windows, anyhow). If I type > ALT+TAB to go to another application, and then type ALT+TAB to come back, > nothing seems to have keyboard focus. This was happening only in Windows. Moving the dropdown logic to list's focus out fixed the problem. Please review the modified patch. Thanks! Looks good, Lakshmi! Go ahead and commit. Thanks for updating the comment - it was getting old and confusing. :) Thanks for the review, Carolyn! Fixed in HEAD > 20110216 |
Created attachment 187387 [details] Screenshot To reproduce: 1. Find a CCombo 2. Open list pop-up by clicking on the CCombo 3. Press ALT+TAB Result: pop-up floats in the air Expected: list pop-up should dissappear See attached snippet / screenshot.