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

Bug 364029

Summary: [QuickAccess] Quick access closes during resize on Linux
Product: [Eclipse Project] Platform Reporter: Dean Roberts <dean.t.roberts>
Component: UIAssignee: Dean Roberts <dean.t.roberts>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gheorghe, pwebster
Version: 4.2Flags: pwebster: review+
Target Milestone: 4.2 M4   
Hardware: All   
OS: Linux-GTK   
Whiteboard:
Bug Depends on: 320673    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Dean Roberts CLA 2011-11-17 08:40:10 EST
+++ This bug was initially created as a clone of Bug #363582 +++

Very hard to resize the Quick access list since it tends to close at random points during the resize.
Comment 1 Dean Roberts CLA 2011-11-17 08:41:37 EST
Comment originally from Bogdan

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]
Comment 2 Dean Roberts CLA 2011-11-17 08:56:02 EST
Created attachment 207143 [details]
Patch

Needed to add a set text.setFocus() to Bogdan's suggestion to allow the table to close after a resize when other widgets are selected.

On Linux, the table and SearchField loose focus during the resize.  So if we prevent the table close during resize none of the widgets that are capable of closing the table when the SearchField loose focus have focus.

This fix seems to work on Linux and does not adversely effect Windows
Comment 4 Dean Roberts CLA 2011-11-28 08:27:21 EST
Fixed as noted in comment 3