summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-11 15:11:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-11 15:11:53 (GMT)
commitb732c4b500727e5b3b0b00a869c8316516f1d7e3 (patch)
treeeea8fb51f72a8dba827a07aa139041679257ecb5 /unix
parent908da12349949cd077caa0cf8de06f88c23c656f (diff)
downloadtk-b732c4b500727e5b3b0b00a869c8316516f1d7e3.zip
tk-b732c4b500727e5b3b0b00a869c8316516f1d7e3.tar.gz
tk-b732c4b500727e5b3b0b00a869c8316516f1d7e3.tar.bz2
Don't mind XKeycodeToKeysym() deprecation warning any more. Some MacOS code cleanup (e.g. no "register" keyword any more)
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixKey.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index 045d291..87aa888 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -17,6 +17,7 @@
** 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
@@ -361,6 +362,12 @@ TkpGetKeySym(
&& (eventPtr->xkey.state & LockMask))) {
index += 1;
}
+
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
sym = TkKeycodeToKeysym(dispPtr, eventPtr->xkey.keycode, 0,
index);
@@ -464,6 +471,11 @@ TkpInitKeymapInfo(
continue;
}
keysym = TkKeycodeToKeysym(dispPtr, *codePtr, 0, 0);
+
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif
+
if (keysym == XK_Mode_switch) {
dispPtr->modeModMask |= ShiftMask << (i/modMapPtr->max_keypermod);
}