mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 12:54:20 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
812930b7cd
commit
d70b546f2e
@@ -320,7 +320,7 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
||||
/* conditional mask check to get numeric keypad keys */
|
||||
ksym = XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, ev.xkey.state & numlock_mask?1:0);
|
||||
else
|
||||
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, 0);
|
||||
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
|
||||
|
||||
if (!IsModifierKey(ksym)) {
|
||||
if (convert_case) {
|
||||
|
||||
@@ -384,7 +384,7 @@ static void fillModifierPopUp(WMPopUpButton * pop)
|
||||
if (xext_xkb_supported)
|
||||
ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l);
|
||||
else
|
||||
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0);
|
||||
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
|
||||
if (ksym != NoSymbol)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user