Bug 545403 - [GTK3] MouseWheel event only reports GDK.GDK_SCROLL_UP
Summary: [GTK3] MouseWheel event only reports GDK.GDK_SCROLL_UP
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 4.12 M1   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard: RHT
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-03-14 09:35 EDT by Thomas Singer CLA
Modified: 2019-04-09 10:05 EDT (History)
2 users (show)

See Also:


Attachments
Snippet to reproduce (468 bytes, text/x-java)
2019-03-14 09:35 EDT, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2019-03-14 09:35:55 EDT
Created attachment 277864 [details]
Snippet to reproduce

When executing the attached snippet on CentOS 7.6 (GTK 3.22.30, Adwaita theme) using SWT v4926r2, and scrolling the mouse wheel over the shells content area, it will print 3, no matter whether you scroll the wheel up or down.
Comment 1 Eric Williams CLA 2019-03-14 10:47:20 EDT
I cannot reproduce this issue -- scrolling will print -3 or 3 depending on the direction.

Is this a standard GNOME environment? Default scroll settings in the settings pane?
Comment 2 Eric Williams CLA 2019-03-14 11:22:46 EDT
Another question: Wayland or X11?
Comment 3 Thomas Singer CLA 2019-03-15 03:39:02 EDT
Thank you for the quick test. Yes, it is a standard GNOME environment on CentOS 7.6. The "Natural Scrolling" setting has no influence - no matter how it is selected, the scroll event on non-scrollbar controls always returns 3. XDG_SESSION_TYPE is x11.

I also can reproduce the problem on stock Ubuntu 18.04.2 (XDG_SESSION_TYPE = x11).

The odd thing is, the StyledText, Table, Tree controls can scroll up and down, but other controls just get the up-event.
Comment 4 Thomas Singer CLA 2019-03-15 04:13:59 EDT
I've bisected now and it looks like your commit 4cf23b394103bc16d4d5b7ccafec7133ba93664d

Bug 541650: [GTK4] GdkEvents are private and can no longer be created

Handle GdkEventScroll cases.

Change-Id: I04f4d377fda7f719d00691e349f00e385c8b3f18
Signed-off-by: Eric Williams <ericwill@redhat.com>

introduces this regression.
Comment 5 Eric Williams CLA 2019-03-15 08:57:59 EDT
(In reply to Thomas Singer from comment #4)
> I've bisected now and it looks like your commit
> 4cf23b394103bc16d4d5b7ccafec7133ba93664d
> 
> Bug 541650: [GTK4] GdkEvents are private and can no longer be created
> 
> Handle GdkEventScroll cases.
> 
> Change-Id: I04f4d377fda7f719d00691e349f00e385c8b3f18
> Signed-off-by: Eric Williams <ericwill@redhat.com>
> 
> introduces this regression.

Okay I'll investigate.
Comment 6 Eclipse Genie CLA 2019-03-15 13:43:36 EDT
New Gerrit change created: https://git.eclipse.org/r/138848
Comment 7 Eric Williams CLA 2019-03-15 13:45:28 EDT
Thomas I've added a patch for you to review, I believe it solves the issue but I'd like to verify with you first before merging.
Comment 8 Thomas Singer CLA 2019-03-15 15:02:51 EDT
Thank you for the quick fix, Eric. My test works fine now with your Gerrit patch.
Comment 10 Eric Williams CLA 2019-03-15 15:28:54 EDT
(In reply to Eclipse Genie from comment #9)
> Gerrit change https://git.eclipse.org/r/138848 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=503289d0caf86406cbac61cd86030cd7d18ec4d8

In master now.


(In reply to Thomas Singer from comment #8)
> Thank you for the quick fix, Eric. My test works fine now with your Gerrit
> patch.

My pleasure! The reporter doing a bisect/investigation really speeds up the process as well.
Comment 11 Eric Williams CLA 2019-04-09 10:05:48 EDT
Verified in I20190409-0600.