From 9f8dc6f5dc21a52baacf575faa6c13a8652cc7f2 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Sun, 26 Feb 2023 09:15:42 +0800 Subject: [PATCH] Use W_KeycodeToKeysym instead of XkbKeycodeToKeysym This patch replaces XkbKeycodeToKeysym by our own function W_KeycodeToKeysym. --- src/misc.c | 3 ++- src/xmodifier.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/misc.c b/src/misc.c index 4c7fa3a5..88d0f9a8 100644 --- a/src/misc.c +++ b/src/misc.c @@ -38,6 +38,7 @@ #include #include +#include #include #include "window.h" @@ -840,7 +841,7 @@ char *GetShortcutKey(WShortKey key) } } - key_name = XKeysymToString(XkbKeycodeToKeysym(dpy, key.keycode, 0, 0)); + key_name = XKeysymToString(W_KeycodeToKeysym(dpy, key.keycode, 0)); if (!key_name) return NULL; diff --git a/src/xmodifier.c b/src/xmodifier.c index 52088676..411a3a2a 100644 --- a/src/xmodifier.c +++ b/src/xmodifier.c @@ -36,6 +36,7 @@ Perpetrator: Sudish Joseph , Sept. 1997. */ #include #include +#include #include "WindowMaker.h" #include "xmodifier.h" @@ -174,7 +175,7 @@ static void x_reset_modifier_mapping(Display * display) } code = x_modifier_keymap->modifiermap[modifier_index * mkpm + modifier_key]; - sym = (code ? XkbKeycodeToKeysym(display, code, 0, column) : NoSymbol); + sym = (code ? W_KeycodeToKeysym(display, code, column) : NoSymbol); if (sym == last_sym) continue;