Bug 518414 - [gtk] Package explorer double click opens currently selected (highlighted) resource
Summary: [gtk] Package explorer double click opens currently selected (highlighted) re...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P2 major with 1 vote (vote)
Target Milestone: 4.9 RC1   Edit
Assignee: Xi Yan CLA
QA Contact: Eric Williams CLA
URL:
Whiteboard:
Keywords: triaged, ui, usability
Depends on:
Blocks:
 
Reported: 2017-06-16 18:14 EDT by Tyler Cook CLA
Modified: 2018-08-27 10:01 EDT (History)
5 users (show)

See Also:
akurtakov: review+


Attachments
Video showing issue (1.90 MB, application/octet-stream)
2017-06-16 19:03 EDT, Tyler Cook CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Cook CLA 2017-06-16 18:14:43 EDT
Neon.3 Release (4.6.3) running on Arch Linux with nonreparenting window manager (dwm)

Double-clicking on the "expand" arrow next to a package or folder in the package explorer collapses the ENTIRE package tree.  Is this a bug or a feature?  This usually causes the most pain when I'm deep in the hierarchy and accidentally double click on a package.

Expected behaviour: double clicking a package arrow expands and then collapses the specific package ONLY
Observed behaviour: double clicking a package arrow collapses the entire package tree

Additional note:
running "wmname LG3D" sometimes fixes strange Java GUI issues when using dwm, but seems to have no effect on this issue.
Comment 1 Tyler Cook CLA 2017-06-16 18:43:42 EDT
I figured out that the entire tree is collapsed on double click when the root is selected (highlighted).  So the problem seems to be that double clicking on a package arrow in the package explorer also clicks on the currently highlighted item.  

For example: double clicking on a package arrow while a text file is also highlighted somewhere in the tree will open the text file in the editor.  This is certainly a bug.
Comment 2 Tyler Cook CLA 2017-06-16 19:03:41 EDT
Created attachment 268952 [details]
Video showing issue
Comment 3 tzafrir p CLA 2017-10-19 01:48:18 EDT
This also happens in Oxygen (4.7.1)
Comment 4 Dani Megert CLA 2017-11-12 12:26:54 EST
Can you provide detailed steps? I can't reproduce it from looking at the video.
Comment 5 Tyler Cook CLA 2017-11-12 12:42:15 EST
Steps to reproduce:
- Select something in the package tree (a text file for example)
- Double click on ANY "expand" arrow in the package tree and the highlighted item will be opened.

It's as if double clicking on the arrow also double clicks the highlighted item.

I've observed this on clean installations of Eclipse 4.7.1a on Arch Linux and Ubuntu (Java8 and Java9).
Comment 6 Dani Megert CLA 2017-11-12 12:47:30 EST
(In reply to Tyler Cook from comment #5)
> Steps to reproduce:
> - Select something in the package tree (a text file for example)
> - Double click on ANY "expand" arrow in the package tree and the highlighted
> item will be opened.
> 
> It's as if double clicking on the arrow also double clicks the highlighted
> item.
> 
> I've observed this on clean installations of Eclipse 4.7.1a on Arch Linux
> and Ubuntu (Java8 and Java9).

Might be an OS specific issue then. It works fine for me on Windows with 4.8 M3a:
http://download.eclipse.org/eclipse/downloads/drops4/S-4.8M3a-201710300400/


Leo, can you check on Linux?
Comment 7 Leo Ufimtsev CLA 2017-11-13 10:18:53 EST
(In reply to Dani Megert from comment #6)
> (In reply to Tyler Cook from comment #5)
> > Steps to reproduce:
> > - Select something in the package tree (a text file for example)
> > - Double click on ANY "expand" arrow in the package tree and the highlighted
> > item will be opened.
> > 
> > It's as if double clicking on the arrow also double clicks the highlighted
> > item.
> > 
> > I've observed this on clean installations of Eclipse 4.7.1a on Arch Linux
> > and Ubuntu (Java8 and Java9).
> 
> Might be an OS specific issue then. It works fine for me on Windows with 4.8
> M3a:
> http://download.eclipse.org/eclipse/downloads/drops4/S-4.8M3a-201710300400/
> 
> 
> Leo, can you check on Linux? 

Yea, this happens on Linux. I can reproduce this. Gtk3.22, I20170802-0800
-> Moving to swt.

It's been bothering me for many months as well, but I never quite figured that double clicking opens the selected item and I didn't know it was Linux specific. I just thought that it's a strange glitch of sorts. This bug report clarifies the issue, thank you for submission.

We should definetley fix this. It's very annoying.

I wonder if my package explorer fix a few years ago got something to do with this bug:
Bug 312568 – [GTK] Editor does not get focus after double click from Project/Package Explorer 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=312568

Because the patch above changed how focus was assigned between package explorer and editor. 
It's possible that we need to implement some logic such that default selection is not triggered for the 'expand/collapse' triangle. I'd have to check if Gtk supports such behaviour, investigate how native gtk widgets behave with the expand/collapse triangle.

It would be beneficial to bisect and see if SWT before my patch had a different behavior.

I'm currently working on Webkit2 port, which should hopefully be complete this/next month. Hopefull I'll have time to investigate this after. (But anyone is welcome to investigate).
Comment 8 Leo Ufimtsev CLA 2017-11-13 10:20:04 EST
Feel free to vote for bugs that bother you. Bugs with lots of votes attract my attention more :-).
Comment 9 Eclipse Genie CLA 2018-08-21 13:20:27 EDT
New Gerrit change created: https://git.eclipse.org/r/127803
Comment 11 Eclipse Genie CLA 2018-08-22 11:22:19 EDT
New Gerrit change created: https://git.eclipse.org/r/127866
Comment 13 Eclipse Genie CLA 2018-08-22 11:22:47 EDT
New Gerrit change created: https://git.eclipse.org/r/127867
Comment 15 Eric Williams CLA 2018-08-24 10:22:45 EDT
(In reply to Eclipse Genie from comment #14)
> Gerrit change https://git.eclipse.org/r/127867 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=d8772ff696a4bb41625e7b7e0282697146c213f8

In master now, thanks for the patch Xi.
Comment 16 Eric Williams CLA 2018-08-27 10:01:06 EDT
Verified in I20180826-2000.