1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-14 21:15:50 +01:00

WINGs: W_KeycodeToKeysym remove unnecessary if test

min_kc value is always -1 at that point in the code, so need to test it
as it's always true.
This commit is contained in:
David Maciejak
2023-03-08 07:21:30 +08:00
committed by Carlos R. Mafra
parent 0b2fd6a8c8
commit 038a3588d6

View File

@@ -226,10 +226,7 @@ KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index)
KeySym *key_syms;
KeySym ks;
if (min_kc == -1) {
(void) XDisplayKeycodes(display, &min_kc, &max_kc);
}
XDisplayKeycodes(display, &min_kc, &max_kc);
if (keycode < min_kc || keycode > max_kc || index < 0) {
return NoSymbol;
}