Bug 492529
| Summary: | Openmotif accelerators XmNaccelerator do not work with CapsLock/ScrollLock/NumLock modifiers | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Olivier Fourdan <ofourdan> | ||||||||||
| Component: | openmotif | Assignee: | Thomas Woerner <twoerner> | ||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Filip Holec <fholec> | ||||||||||
| Severity: | urgent | Docs Contact: | |||||||||||
| Priority: | urgent | ||||||||||||
| Version: | 5.2 | CC: | cward, fholec, jwest, kem, pknirsch, psplicha, tao, yves.begrand | ||||||||||
| Target Milestone: | rc | Keywords: | Patch, ZStream | ||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2013-10-01 00:32:33 UTC | Type: | --- | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Embargoed: | |||||||||||||
| Bug Depends On: | |||||||||||||
| Bug Blocks: | 569908 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Olivier Fourdan
2009-03-27 09:19:24 UTC
Created attachment 336985 [details]
Proposed patch
For the accelerators to work, we need to filter the state of the KeyPress event with the appropriate modifier mask.
But the mask depends on the actual modifiers mapping, so this needs to be determined first, that's the purpose of the InitModifiers() function in the patch.
Once the appropriate modifier mask is known, all that needs to be done is to use that mask prior to compare the state of the modifiers in the event and the expected modifiers in XmMatchKeyEvent() in lib/Xm/MapEvents.c
Please also note that some Motif applications implement workarounds for that issue in Motif, like NEdit since 5.2 that has a mechanism to add the required grabs on all combinations of modifiers mask (that's in NEdit-5.5/util/misc.c) AFAICT, the proposed fix in Openmotif does not break NEdit workaround, as the event will be processed either by Openmotif or by the additional grab in NEdit. Created attachment 341911 [details]
Reworked patch
The previous patch was just partially working, because the activa grabs were not modifed to also grab the various problematic modifiers combinations.
This new version adds the missing bits (ir XtGrabKey/XtUngrabKey of key + all modifiers combinations) and also refactor the added code a bit to be cleaner and hopefully more in line with upstream coding style.
Created attachment 341912 [details]
Another reproducer
Another reproducer provided by the customer, that demonstrates the need for the updated patch (ie, the new reworked patch also fixes the problem in the case of that new reproducer)
This patch has been accepted upstream. (motifzone bz#345) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1355.html |