Description: Replace calls to XKeycodeToKeysym by XkbKeycodeToKeysym
Forwarded: no
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Last-Update: 2021-02-19
--- a/vncviewer/desktop.c
+++ b/vncviewer/desktop.c
@@ -179,7 +179,7 @@
   case LeaveNotify:
     for (i = 0; i < 256; i++) {
       if (modifierPressed[i]) {
-	SendKeyEvent(XKeycodeToKeysym(dpy, i, 0), False);
+	SendKeyEvent(XkbKeycodeToKeysym(dpy, i, 0, 0), False);
 	modifierPressed[i] = False;
       }
     }
@@ -312,7 +312,7 @@
     XLookupString(&ev->xkey, keyname, 256, &ks, NULL);
 
     if (IsModifierKey(ks)) {
-      ks = XKeycodeToKeysym(dpy, ev->xkey.keycode, 0);
+      ks = XkbKeycodeToKeysym(dpy, ev->xkey.keycode, 0, 0);
       modifierPressed[ev->xkey.keycode] = (ev->type == KeyPress);
     }
 
--- a/vncviewer/vncviewer.h
+++ b/vncviewer/vncviewer.h
@@ -35,6 +35,7 @@
 #include <X11/Shell.h>
 #include <X11/Xmd.h>
 #include <X11/keysym.h>
+#include <X11/XKBlib.h>
 #include <X11/Xatom.h>
 #include <X11/Xmu/StdSel.h>
 #include "rfbproto.h"
