Bug 544296 - [Gtk] Regression: KeyEvent keyCode no longer set
Summary: [Gtk] Regression: KeyEvent keyCode no longer set
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.11 M3   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard: RHT
Keywords: regression, triaged
Depends on:
Blocks:
 
Reported: 2019-02-08 15:52 EST by Patrick Tasse CLA
Modified: 2019-02-19 09:28 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Tasse CLA 2019-02-08 15:52:37 EST
The keyCode in KeyEvent no longer has a value set, for example when pressing the '.' key.

Following the code in Widget.sendIMKeyEvent, the event parameter is 0, the ptr and state variables are set, but the event remains 0, which leads to calling setInputState instead of setKeyState.
Comment 1 Eric Williams CLA 2019-02-08 16:04:48 EST
Can you provide a snippet which demonstrates the issue? Also which OS/GTK3 version?
Comment 2 Patrick Tasse CLA 2019-02-08 16:40:54 EST
Hi Eric,

To reproduce, just put a breakpoint on Widget.sendIMKeyEvent(), then press the '.'  key on the keyboard.

I'm still using GTK 3.10.8 (the best GTK ;) on Ubuntu 14.04.
Comment 3 Patrick Tasse CLA 2019-02-08 16:51:35 EST
If it helps, the KeyEvent sent by gtk_key_release_event has the correct keycode and event is not 0. But on the key press, I don't see gtk_key_press_event, instead the KeyEvent comes from Canvas.gtk_commit where the event is hardcoded to 0.
Comment 4 Eclipse Genie CLA 2019-02-11 10:02:02 EST
New Gerrit change created: https://git.eclipse.org/r/136688
Comment 5 Eric Williams CLA 2019-02-11 10:03:20 EST
(In reply to Eclipse Genie from comment #4)
> New Gerrit change created: https://git.eclipse.org/r/136688

Hi Patrick, would you be able to take a look at this patch? I believe it resolves the issue but I want to confirm with you (if possible) before merging.
Comment 7 Eric Williams CLA 2019-02-11 14:10:25 EST
(In reply to Eclipse Genie from comment #6)
> Gerrit change https://git.eclipse.org/r/136688 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=42bf7febc003b13ab578fc601862a0b5d36d2b78

In master now.
Comment 8 Eric Williams CLA 2019-02-19 09:28:50 EST
Verified in I20190219-0600.