Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364029 - [QuickAccess] Quick access closes during resize on Linux
Summary: [QuickAccess] Quick access closes during resize on Linux
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All Linux-GTK
: P3 normal (vote)
Target Milestone: 4.2 M4   Edit
Assignee: Dean Roberts CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 320673
Blocks:
  Show dependency tree
 
Reported: 2011-11-17 08:40 EST by Dean Roberts CLA
Modified: 2011-12-06 10:22 EST (History)
2 users (show)

See Also:
pwebster: review+


Attachments
Patch (867 bytes, patch)
2011-11-17 08:56 EST, Dean Roberts CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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