| Summary: | [QuickAccess] Quick access closes during resize | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dean Roberts <dean.t.roberts> | ||||||
| Component: | UI | Assignee: | Dean Roberts <dean.t.roberts> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | gheorghe, pwebster | ||||||
| Version: | 4.2 | Flags: | dean.t.roberts:
review?
(pwebster) |
||||||
| Target Milestone: | 4.2 M4 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 362421 | ||||||||
| Attachments: |
|
||||||||
|
Description
Dean Roberts
Created attachment 206841 [details]
Patch
Created attachment 206842 [details]
Fix pre-existing warnings in SearchField - Apply after real patch
I still get the same problem when I start to drag a corner on my linux box. It almost immediately disappears. It only works if I activate the shell (by using the down arrow or something). Then I can resize it. PW The problem on Linux appears to be Linux specific and an SWT issue. I've asked Bogdan to take a look at it. In essence, The Text widget is losing Focus which is calling SearchField.checkFocusLost() but the checkFocusLost() code is executing before a new focusControl is set. This can be confirmed by wrapping the code in checkFocusLost() with a syncExec rather than the existing asyncExec and observing the problem goes away. However, syncExec is not a valid fix. Silenio pointed out that this is the same pattern as content assist, and that it would seem the content assist folks worked around it. I suggest that this patch could (should?) be released as is, since it does fix the Windows case and makes the Linux case no worse. It would also allow the applying of the other QuickAssist patches I've submitted without getting into overlap hell. On Linux, during a resize, there will be no focus control set (can't do anything about that).
We might be able to get around the problem by checking the current active shell. If it is the same as the table's shell then run away, else keep going. This seemed to work on both Win32 and Linux, but some more testing is warranted.
Something like this:
protected void checkFocusLost(final Table table, final Text text) {
table.getDisplay().asyncExec(new Runnable() {
public void run() {
if (!table.isDisposed() && !text.isDisposed()) {
>> if (table.getDisplay().getActiveShell() == table.getShell()) return;
[Rest is unchanged]
(In reply to comment #5) > I suggest that this patch could (should?) be released as is, since it does fix > the Windows case and makes the Linux case no worse. I released the fix as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=31b6f47769902c006ddb775d5a08ce2d76b37fb5 I also released the warnings. If I had better git-fu, I could have squashed the commits and then pushed, but no luck. PW Marking as fixed. Opened bug 360429 to track the Linux issue Verified on Windows 7 for build I20111205-2330 |