1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00
Files
wmaker/WPrefs.app/MouseSettings.c
David Maciejak d70b546f2e Fix wrong XKeycodeToKeysym index value
XKeycodeToKeysym was deprecated some time ago and wmaker code was patched to use the definition from XKBlib instead.
(https://repo.or.cz/wmaker-crm.git?a=commit;h=0382dd5dd7ecae2112a0c6366eaf9e6ab68ad354)

Before being deprecated,  XKeycodeToKeysym was prototyped at X11/Xlib.h as
KeySym XKeycodeToKeysym(display, keycode, index)

Now it's available in X11/XKBlib.h as
KeySym XkbKeycodeToKeysym(display, keycode, group, level)

Basically level now which is the 4th parameter is our old index variable (3rd parameter).

On systems which don't have xkb supported the value set for index is wrong.
As seen in old patch at https://repo.or.cz/wmaker-crm.git/blobdiff/139f912e618870cc7fd908099f203450547eb658..43c3526d2120712f72579398b73ef92283d9078b:/WPrefs.app/MouseSettings.c
we should pass the l value to old XKeycodeToKeysym function and not the 0 value which is used for the group in the new XkbKeycodeToKeysym definition.
2023-02-11 10:30:52 +00:00

20 KiB