Community
Participate
Working Groups
Please run the attached snippet on Windows 10 and on Linux (tried on Ubuntu 20.04 and Manjaro). Press the main Enter key as well as the Return key on the keypad. For the Return key you will see the output 16777296 13 on both platforms, but only on Windows you will see the output 13 13 for the Enter key.
Created attachment 285260 [details] Snippet to reproduce
Even a SWT.Traverse listener is not called when pressing the Enter key on Linux - at least inside the Tree control.
I have bisected the SWT sources and the bug was introduced between v4936r17 (db7390ee) and v4936r18 (3fbc5c63). There are 2 commits Bug 488772 (TreeDefaultSelectionOrder) - [Gtk][Tree] defaultSelection Bug 565818 - [Regression] KeyEvent keyCode changed in 2020-09 M2 that might cause it.
(In reply to Thomas Singer from comment #3) > I have bisected the SWT sources and the bug was introduced between v4936r17 > (db7390ee) and v4936r18 (3fbc5c63). There are 2 commits > > Bug 488772 (TreeDefaultSelectionOrder) - [Gtk][Tree] defaultSelection > Bug 565818 - [Regression] KeyEvent keyCode changed in 2020-09 M2 > > that might cause it. Most likely bug 488772 / https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/166617, if the problem appears on trees only. Paul, could you please take a look?
(In reply to Andrey Loskutov from comment #4) > Most likely bug 488772 / > https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/166617, if the > problem appears on trees only. Paul, could you please take a look? But https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/167295 looks also "good" :-)
Reverting the commit Bug 488772 (TreeDefaultSelectionOrder) - [Gtk][Tree] defaultSelection would solve this bug.
(In reply to Thomas Singer from comment #6) > Reverting the commit > > Bug 488772 (TreeDefaultSelectionOrder) - [Gtk][Tree] defaultSelection > > would solve this bug. Paul, please take a look.
Hello, I took a look and I believe reverting Bug 488772 is the best option. This is because that patch cause gtk_key_button_press to stop calling the super implementation and therefore no KeyDown event. I will try to find a different fix for the patch we are reverting.
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #8) > Hello, I took a look and I believe reverting Bug 488772 is the best option. > This is because that patch cause gtk_key_button_press to stop calling the > super implementation and therefore no KeyDown event. I will try to find a > different fix for the patch we are reverting. Paul, would you please provide the revert gerrit? Would be good to have it before M3.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/176127
Yep, I have provided the reversion that is required for the regression to be fixed.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/176127 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0454e63eb257c484fa997757978f1e2ad8f33bb5
Patch has been merged. Resolving.
Verified. Eclipse SDK Version: 2021-03 (4.19) Build id: I20210216-0600 OS: Linux, v.5.9.15-200.fc33.x86_64, x86_64 / gtk 3.24.24, WebKit 2.30.4 Java version: 11.0.9.1