After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734621 - libgnomekbd/gkbd-keyboard-drawing.c: fix modifier key pressed state
libgnomekbd/gkbd-keyboard-drawing.c: fix modifier key pressed state
Status: RESOLVED FIXED
Product: libgnomekbd
Classification: Core
Component: Drawing
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libgnomekbd maintainers
Sergey V. Udaltsov
Depends on:
Blocks:
 
 
Reported: 2014-08-11 14:46 UTC by Antonio Ospite
Modified: 2016-01-21 20:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libgnomekbd/gkbd-keyboard-drawing.c: fix modifier key pressed state (2.09 KB, patch)
2014-08-11 14:46 UTC, Antonio Ospite
committed Details | Review

Description Antonio Ospite 2014-08-11 14:46:19 UTC
Created attachment 283108 [details] [review]
libgnomekbd/gkbd-keyboard-drawing.c: fix modifier key pressed state

Right now when tracking modifiers is enabled the pressed state of the modifiers keys is drawn wrong.

To replicate the issue use something like:

./test/gkbd-keyboard-drawing-test --groups=1 --levels=1 --track-modifiers

and press shift, the symbols on the keyboard change but the shift key is not shown as pressed.

This is because drawing->keys gets reallocated an zeroed when the modifier keypress event fires.

The following patch is an attempt to fix the current situation, the code it removes was also doing some redundant check, which made me think that this part of the code was not reviewed or tested properly in the first place.

Any comments?

Thanks,
   Antonio
Comment 1 Antonio Ospite 2016-01-11 14:27:09 UTC
ping
Comment 2 Michael Catanzaro 2016-01-21 20:39:37 UTC
Works for me, thanks.

Attachment 283108 [details] pushed as 6c4816f - libgnomekbd/gkbd-keyboard-drawing.c: fix modifier key pressed state