libX11: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Dec 14 20:19:20 UTC 2024


 src/KeyBind.c |   30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

New commits:
commit 7c75a066454fbafe586f7c24aeee65348f9d2bcc
Author: Pierre Le Marre <dev at wismill.eu>
Date:   Mon Dec 9 14:51:17 2024 +0100

    Fix misuse of UCSConvertCase in XConvertCase
    
    There are two issues with the use of `UCSConvertCase` in `XConvertCase`:
    
    - Some Latin-1 keysyms do not map within Latin-1, e.g. `ssharp`.
      Only Latin-1 keysyms have the same value as the Unicode code point of
      their corresponding character. So `UCSConvertCase` does not work for
      some Latin-1 keysyms as it returns Unicode code points outside Latin-1
      that do not match their corresponding keysyms values.
    - Some Unicode keysyms should map to Latin-1 keysyms (<0x100). But the
      Unicode keysym mask 0x01000000 is applied blindly to the result of
      `UCSConvertCase`, resulting in invalid Unicode keysyms (0x010000nn)
      while they should be Latin-1 keysyms.
    
    Example with ß/ẞ:
    
    ```c
    KeySym lower, upper;
    
    XConvertCase(XK_ssharp, &lower, &upper);
    // Expected: lower == XK_ssharp, upper == U1E9E
    // Got:      lower == XK_ssharp, upper == 0x1E9E
    
    XConvertCase(U1E9E, &lower, &upper);
    // Expected: lower == XK_ssharp, upper == U1E9E
    // Got:      lower == 0x10000df, upper == U1E9E
    ```
    
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/274>



More information about the xorg-commit mailing list