summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixKey.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-02-23 15:12:17 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-02-23 15:12:17 (GMT)
commitda8764ce8dc25d831e182604c8f148247406cabd (patch)
tree7671b56e5970887baf6d349ed2b98d4eac0bb59c /unix/tkUnixKey.c
parentc93120c9140ebe973dd98b9ac31b2051830871c8 (diff)
downloadtk-da8764ce8dc25d831e182604c8f148247406cabd.zip
tk-da8764ce8dc25d831e182604c8f148247406cabd.tar.gz
tk-da8764ce8dc25d831e182604c8f148247406cabd.tar.bz2
Remove detection of Xkb performed at runtime, which removes the deprecation warning about XKeyCodeToKeysym. See ticket [3551802fff].
Diffstat (limited to 'unix/tkUnixKey.c')
-rw-r--r--unix/tkUnixKey.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index 6681ad9..77db78e 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -12,20 +12,11 @@
#include "tkInt.h"
-/*
-** Bug [3607830]: Before using Xkb, it must be initialized. TkpOpenDisplay
-** does this and sets the USE_XKB flag if xkb is supported.
-** (should this be function ptr?)
-*/
#ifdef HAVE_XKBKEYCODETOKEYSYM
# include <X11/XKBlib.h>
#else
# define XkbKeycodeToKeysym(D,K,G,L) XKeycodeToKeysym(D,K,L)
#endif
-#define TkKeycodeToKeysym(D,K,G,L) \
- ((D)->flags & TK_DISPLAY_USE_XKB) ? \
- XkbKeycodeToKeysym((D)->display,K,G,L) : \
- XKeycodeToKeysym((D)->display,K,L)
/*
* Prototypes for local functions defined in this file:
@@ -237,7 +228,7 @@ done:
/*
* When mapping from a keysym to a keycode, need information about the
- * modifier state to be used so that when they call TkKeycodeToKeysym taking
+ * modifier state to be used so that when they call XbkKeycodeToKeysym taking
* into account the xkey.state, they will get back the original keysym.
*/
@@ -363,7 +354,7 @@ TkpGetKeySym(
&& (eventPtr->xkey.state & LockMask))) {
index += 1;
}
- sym = TkKeycodeToKeysym(dispPtr, eventPtr->xkey.keycode, 0,
+ sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, 0,
index);
/*
@@ -378,7 +369,7 @@ TkpGetKeySym(
|| ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis))
|| ((sym >= XK_Ooblique) && (sym <= XK_Thorn)))) {
index &= ~1;
- sym = TkKeycodeToKeysym(dispPtr, eventPtr->xkey.keycode,
+ sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode,
0, index);
}
}
@@ -389,7 +380,7 @@ TkpGetKeySym(
*/
if ((index & 1) && (sym == NoSymbol)) {
- sym = TkKeycodeToKeysym(dispPtr, eventPtr->xkey.keycode,
+ sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode,
0, index & ~1);
}
return sym;
@@ -439,7 +430,7 @@ TkpInitKeymapInfo(
if (*codePtr == 0) {
continue;
}
- keysym = TkKeycodeToKeysym(dispPtr, *codePtr, 0, 0);
+ keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0);
if (keysym == XK_Shift_Lock) {
dispPtr->lockUsage = LU_SHIFT;
break;
@@ -465,7 +456,7 @@ TkpInitKeymapInfo(
if (*codePtr == 0) {
continue;
}
- keysym = TkKeycodeToKeysym(dispPtr, *codePtr, 0, 0);
+ keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0);
if (keysym == XK_Mode_switch) {
dispPtr->modeModMask |= ShiftMask << (i/modMapPtr->max_keypermod);
}