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

Bug 529126 (swtTreeNoMouseDownEvent)

Summary: [Wayland][GTK3] Tree does not notify SWT.MouseDown listeners
Product: [Eclipse Project] Platform Reporter: Thomas Singer <eclipse>
Component: SWTAssignee: Eric Williams <ericwill>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P2 CC: ericwill, gautier.desaintmartinlacaze, jan.public, lufimtse
Version: 4.8Keywords: triaged
Target Milestone: 4.8 M7   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/114692
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=b604eee7de39f258e1c9d04e70a0f98aaf17a4f2
https://git.eclipse.org/r/121103
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=f894bab36d1d8d6bf87a55af6e74c42eb00fb145
Whiteboard:
Bug Depends on:    
Bug Blocks: 516841    
Attachments:
Description Flags
Sample code none

Description Thomas Singer CLA 2017-12-22 04:04:23 EST
Please launch the attached sample code and click anywhere in a tree item. On Windows (tried Windows 10) you will see output, on Linux with SWT_GTK3=0 you will see output, but not with SWT_GTK3=1 (or without it). Tried on Fedora 27.
Comment 1 Thomas Singer CLA 2017-12-22 04:05:14 EST
Created attachment 272017 [details]
Sample code
Comment 2 Eric Williams CLA 2017-12-22 08:51:34 EST
I cannot reproduce the issue, I am getting output printed properly on GTK3 with Fedora 27. Is this only on 4.7.2 or did you try 4.8 M4 as well?
Comment 3 Eric Williams CLA 2017-12-22 09:12:37 EST
Hmm, I tried on the 4.7 branch and I am still seeing events being fired correctly.
Comment 4 Thomas Singer CLA 2017-12-22 09:18:28 EST
I've only tried with 4.7.
Comment 5 Thomas Singer CLA 2017-12-22 10:46:54 EST
I've now installed Fedora 27 freshly also in VirtualBox and tried 4.8M4 - I'm getting the same result (no listener invoked).
Comment 6 Leo Ufimtsev CLA 2017-12-22 11:31:06 EST
I'm able to reproduce the issue with wayland backend.

GDK_BACKEND=wayland   # reproduces
GDK_BACKEND=x11       # works as expected.
(gtk3.22, Fedora 27, Wayland)

This is a pretty significant bug, we should investigate.

Work around for mean time:
- export GDK_BACKEND=x11
- or start fedora in classic mode (gear button on login).
Comment 7 Eclipse Genie CLA 2017-12-22 11:39:03 EST
New Gerrit change created: https://git.eclipse.org/r/114692
Comment 8 Eric Williams CLA 2017-12-22 11:47:14 EST
(In reply to Eclipse Genie from comment #7)
> New Gerrit change created: https://git.eclipse.org/r/114692

Adding the bug snippet to the repo.

Also this bug is not a critical bug, but it is major. See: https://wiki.eclipse.org/Eclipse/Bug_Tracking#Severity
Comment 10 Thomas Singer CLA 2018-01-06 15:05:09 EST
Has someone already try to fix this bug? IMHO we can't expect the user to switch their stock Fedora 27 to x11 instead of the default wayland. For example, I have no idea how to do that.
Comment 11 Eric Williams CLA 2018-01-08 09:52:26 EST
(In reply to Thomas Singer from comment #10)
> Has someone already try to fix this bug? IMHO we can't expect the user to
> switch their stock Fedora 27 to x11 instead of the default wayland. For
> example, I have no idea how to do that.

Not yet. For reference, to switch to X11: under the login screen, there is a cog-wheel button next to the blue "login" button. Click and select "GNOME on Xorg" from the drop down menu. This will log you in to an X11 session instead of Wayland.
Comment 12 Eric Williams CLA 2018-01-08 10:22:33 EST
(In reply to Eric Williams from comment #11)
> (In reply to Thomas Singer from comment #10)
> > Has someone already try to fix this bug? IMHO we can't expect the user to
> > switch their stock Fedora 27 to x11 instead of the default wayland. For
> > example, I have no idea how to do that.
> 
> Not yet. For reference, to switch to X11: under the login screen, there is a
> cog-wheel button next to the blue "login" button. Click and select "GNOME on
> Xorg" from the drop down menu. This will log you in to an X11 session
> instead of Wayland.

Furthermore: if you are in a Wayland session and want to launch Eclipse in X11, you can export the GDK_BACKEND=x11 environment variable.
Comment 13 Thomas Singer CLA 2018-01-09 02:32:20 EST
(In reply to Eric Williams from comment #12)
> Furthermore: if you are in a Wayland session and want to launch Eclipse in
> X11, you can export the GDK_BACKEND=x11 environment variable.

Thanks. This help me to work-around the bug in our SmartGit launcher script.
Comment 14 Eric Williams CLA 2018-03-27 11:08:56 EDT
*** Bug 532937 has been marked as a duplicate of this bug. ***
Comment 15 Eclipse Genie CLA 2018-04-12 15:14:41 EDT
New Gerrit change created: https://git.eclipse.org/r/121103
Comment 17 Eric Williams CLA 2018-04-13 14:51:39 EDT
(In reply to Eclipse Genie from comment #16)
> Gerrit change https://git.eclipse.org/r/121103 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=f894bab36d1d8d6bf87a55af6e74c42eb00fb145

In master now.
Comment 18 Eric Williams CLA 2018-05-08 10:30:41 EDT
Verified in I20180507-2205.