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

Bug 466500

Summary: [PopupDialogs] [GTK3] Trying to resize quick outline or quick type hierarchy closes the popup
Product: [Eclipse Project] Platform Reporter: Marc-André Laperle <malaperle>
Component: UIAssignee: Eric Williams <ericwill>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: a.buschatz, arunkumar.thondapu, eclipse, ericwill, markus.kell.r, nobody, peter, piotr.findeisen, sravankumarl
Version: 4.5   
Target Milestone: 4.6 M3   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/58184
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ddcfd1f3efd70591480e6c053946618ef6696104
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485745
Whiteboard:
Bug Depends on:    
Bug Blocks: 441566, 474628    

Description Marc-André Laperle CLA 2015-05-05 18:03:56 EDT
Using Ubuntu 15.04, GTK 3.14.12
Eclipe 4.5-I20150504-2000

1. Open a java file
2. Press Ctrl-O to open the quick outline
3. Try to resize the popup with the mouse using the edges. The popup closes.

The same thing happens with Quick type hierarchy (Ctrl-T). Using GTK2 works (SWT_GTK3=0).
Comment 1 Marc-André Laperle CLA 2015-05-05 18:19:09 EDT
I can reproduce it on Ubuntu 14.04 as well (GTK 3.10.8).
Comment 2 Arun Thondapu CLA 2015-05-06 00:01:33 EDT
Seemed similar to bug 466114 but apparently not, that one is reproducible with GTK2 as well and is probably an older bug unlike this one which happens only with GTK3.
Comment 3 Eric Williams CLA 2015-09-21 10:42:31 EDT
I can reproduce this issue on Fedora 22, Gtk3.16.6, and Eclipse Neon M1.
Comment 4 Eric Williams CLA 2015-09-21 11:48:47 EDT
For reference, this only manifests itself when using the mouse to re-size. Clicking the drop down arrow in the top right hand corner of the quick outline and selecting "re-size" allows the window to re-size (though the outline of the window while re-sizing is broken).
Comment 5 Eric Williams CLA 2015-10-08 11:15:49 EDT
This bug also happens when you click (just click, no hold) the title bar of the Quick Outline window.
Comment 6 Eric Williams CLA 2015-10-08 14:40:52 EDT
This bug has some interesting twists to it. The issue is 100% reproducible on GNOME3, both GNOME3.16 and GNOME3.18. However on KDE and Xfce, the bug isn't always reproducible (and has different behavior). 

For example on Xfce, if you double click the Quick Outline title bar to maximize it, then restore it to normal size, the issue doesn't appear at all after that. 

KDE allows you to maximize the window by double clicking the title bar, but still closes the window if you try to re-size it by dragging the edges. KDE also sometimes doesn't display the issue at all. It also allows you to click the edges of the window, but not drag.

GNOME doesn't allow any clicking/dragging along the edges of the window, nor does it allow double clicking of the title bar. Doing any of these things close the window immediately.

I will investigate further.
Comment 7 Timo Kinnunen CLA 2015-10-08 17:39:33 EDT
Same kind of thing where a popup gets closed immediately after being displayed occurs reproducibly on Windows as well, albeit under special circumstances. The following ingredients are required:

1) Customized StyledText Java editor, modified by calling setAlwaysShowScrollBars(false) on each newly created instance.
2) Mark Read/Write Occurrence annotations set to draw one of the highlights on text in the editor.
3) A Java source code file several screens long.
4) Caret placed on a Java type name or local variable or field.

Under these conditions, pressing Ctrl-T causes the popup to close immediately. In addition one or both scrollbars flicker once, the annotations in text and in overview are cleared and the StyledText component is repainted. It's either the recalculation of the scrollbars or the repaint which causes focus to switch back to StyledText, closing the popup in the process.
Comment 8 Eclipse Genie CLA 2015-10-14 13:41:33 EDT
New Gerrit change created: https://git.eclipse.org/r/58184
Comment 9 Eric Williams CLA 2015-10-14 15:39:27 EDT
(In reply to Eclipse Genie from comment #8)
> New Gerrit change created: https://git.eclipse.org/r/58184

As you can see, this makes changes in Platform UI. 

It seems the issue is caused by an if statement in PopupDialog.java, which closes Shells with no children on the SWT.Deactivate event. It seems this condition was added as part of a workaround for bug 113577. When you remove this call on Gtk, the issue doesn't reproduce anymore. I will continue investigating to see if anything else needs to be done.
Comment 10 Eric Williams CLA 2015-10-16 09:51:51 EDT
(In reply to Eric Williams from comment #9)
> It seems this condition was added as part of a workaround for bug 113577.

I was mistaken, it turns out bug 113577 is actually very similar to this bug. The previous comment in PopupDialog.java was referring to bug 113577 still existing on Gtk SWT, but with no way to check if it was in fact Gtk SWT (vs. Win32 or OS X, for example).

The solution to this bug will also fix bug 113577.
Comment 12 Eric Williams CLA 2015-10-22 12:59:17 EDT
Confirmed fixed in 4.6 N20151021-2000. Marking as resolved.
Comment 13 Eric Williams CLA 2015-10-22 13:01:31 EDT
*** Bug 113577 has been marked as a duplicate of this bug. ***
Comment 14 Eric Williams CLA 2015-11-06 08:59:05 EST
*** Bug 481314 has been marked as a duplicate of this bug. ***
Comment 15 Eric Williams CLA 2018-05-11 15:31:17 EDT
*** Bug 465475 has been marked as a duplicate of this bug. ***