From: Jon Trulson Date: Mon, 23 Mar 2020 18:51:18 +0000 (-0600) Subject: Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=HEAD;p=oweals%2Fcde.git Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym patch supplied from Peter G. --- diff --git a/cde/lib/DtWidget/Editor.c b/cde/lib/DtWidget/Editor.c index 7bd42a99..46b4af92 100644 --- a/cde/lib/DtWidget/Editor.c +++ b/cde/lib/DtWidget/Editor.c @@ -3736,7 +3736,7 @@ GetModeSwitchModifier( for (mapIndex = 3*pMap->max_keypermod; mapIndex < mapSize; mapIndex++) { /* look only at the first 4 columns of key map */ for (keyCol = 0; keyCol < 4; keyCol++) { - keySym = XKeycodeToKeysym(dpy, pMap->modifiermap[mapIndex], keyCol); + keySym = XkbKeycodeToKeysym(dpy, pMap->modifiermap[mapIndex], keyCol); if (keySym == XK_Mode_switch) modeSwitchModMask |= 1 << (mapIndex / pMap->max_keypermod); } diff --git a/cde/programs/dtcalc/motif.c b/cde/programs/dtcalc/motif.c index b1581194..411d381f 100644 --- a/cde/programs/dtcalc/motif.c +++ b/cde/programs/dtcalc/motif.c @@ -2122,7 +2122,7 @@ key_init(void) X->kparray[i - X->kcmin] = 0 ; for (j = 0; j < X->keysyms_per_key; ++j) { - ks = XKeycodeToKeysym(X->dpy, i, j) ; + ks = XkbKeycodeToKeysym(X->dpy, i, j) ; if (IsKeypadKey(ks)) { X->kparray[i - X->kcmin] = 1 ; @@ -2142,7 +2142,7 @@ keypad_keysym(XEvent *xevent) for (i = 0; i < X->keysyms_per_key; ++i) { - ks = XKeycodeToKeysym(X->dpy, keycode, i) ; + ks = XkbKeycodeToKeysym(X->dpy, keycode, i) ; if (IsKeypadKey(ks)) { #ifdef sun diff --git a/cde/programs/dtsession/SmSave.c b/cde/programs/dtsession/SmSave.c index 6db2e4a5..b1eb6f77 100644 --- a/cde/programs/dtsession/SmSave.c +++ b/cde/programs/dtsession/SmSave.c @@ -1326,7 +1326,7 @@ QueryServerSettings( void ) return(-1); } } - tmpMod = XKeycodeToKeysym(smGD.display, modMap->modifiermap[i], 0); + tmpMod = XkbKeycodeToKeysym(smGD.display, modMap->modifiermap[i], 0, 0); sprintf(tmpChar,"%ld", tmpMod); strcat(resSpec, tmpChar); if(i != numLoops) diff --git a/cde/programs/dtwm/WmCPlace.c b/cde/programs/dtwm/WmCPlace.c index dfa42aee..8fbed784 100644 --- a/cde/programs/dtwm/WmCPlace.c +++ b/cde/programs/dtwm/WmCPlace.c @@ -302,7 +302,7 @@ void HandlePlacementKeyEvent (ClientData *pcd, XKeyEvent *pev) } /* convert event data to useful key data */ - keysym = XKeycodeToKeysym (DISPLAY, pev->keycode, 0); + keysym = XkbKeycodeToKeysym (DISPLAY, pev->keycode, 0, 0); control = (pev->state & ControlMask) != 0; big_inc = DisplayWidth(DISPLAY, ACTIVE_PSD->screen) / 20; diff --git a/cde/programs/dtwm/WmResParse.c b/cde/programs/dtwm/WmResParse.c index 164c059b..e5efd1d2 100644 --- a/cde/programs/dtwm/WmResParse.c +++ b/cde/programs/dtwm/WmResParse.c @@ -1554,7 +1554,7 @@ void SyncModifierStrings(void) { if (map->modifiermap[k]) { - KeySym ks = XKeycodeToKeysym(DISPLAY, map->modifiermap[k], 0); + KeySym ks = XkbKeycodeToKeysym(DISPLAY, map->modifiermap[k], 0, 0); char *nm = XKeysymToString(ks); /* Compare, ignoring the trailing '_L' or '_R' in keysym */ diff --git a/cde/programs/dtwm/WmWinConf.c b/cde/programs/dtwm/WmWinConf.c index c3dd6aa8..7a245fcd 100644 --- a/cde/programs/dtwm/WmWinConf.c +++ b/cde/programs/dtwm/WmWinConf.c @@ -279,7 +279,7 @@ void HandleClientFrameMove (ClientData *pcd, XEvent *pev) keyMultiplier++; } - keysym = XKeycodeToKeysym (DISPLAY, pev->xkey.keycode, 0); + keysym = XkbKeycodeToKeysym (DISPLAY, pev->xkey.keycode, 0, 0); control = (pev->xkey.state & ControlMask) != 0; tmpX = tmpY = 0; @@ -692,7 +692,7 @@ Boolean HandleResizeKeyPress (ClientData *pcd, XEvent *pev) keyMult++; } - keysym = XKeycodeToKeysym (DISPLAY, pev->xkey.keycode, 0); + keysym = XkbKeycodeToKeysym (DISPLAY, pev->xkey.keycode, 0, 0); control = (pev->xkey.state & ControlMask) != 0; switch (keysym) { @@ -4328,7 +4328,7 @@ Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev) keyMult++; } - keysym = XKeycodeToKeysym (DISPLAY, pev->xkey.keycode, 0); + keysym = XkbKeycodeToKeysym (DISPLAY, pev->xkey.keycode, 0); control = (pev->xkey.state & ControlMask) != 0; switch (keysym) {