diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-12 08:32:04 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-12 08:32:04 +0200 |
commit | 051d521f6e20761ba6831cecd91883da960fa931 (patch) | |
tree | b28abba7818115d2fed80eb360a79a0f9183948e /nx-X11/lib/X11/XKBBind.c | |
parent | 6dce607bad8711dd06a5a7b69ad1930386b4123b (diff) | |
parent | b8de7bf654929c823080b211aeac56cd213f5a32 (diff) | |
download | nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.gz nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.bz2 nx-libs-051d521f6e20761ba6831cecd91883da960fa931.zip |
Merge branch 'uli42-pr/upgrade_libX11' into 3.6.x
Attributes GH PR #214: https://github.com/ArcticaProject/nx-libs/pull/214
Fixes ArcticaProject/nx-libs#157.
Diffstat (limited to 'nx-X11/lib/X11/XKBBind.c')
-rw-r--r-- | nx-X11/lib/X11/XKBBind.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/nx-X11/lib/X11/XKBBind.c b/nx-X11/lib/X11/XKBBind.c index badbd88b7..2d67e9e1e 100644 --- a/nx-X11/lib/X11/XKBBind.c +++ b/nx-X11/lib/X11/XKBBind.c @@ -74,7 +74,7 @@ XkbKeycodeToKeysym(Display *dpy, int level) { XkbDescRec *xkb; - + if (_XkbUnavailable(dpy)) return NoSymbol; @@ -109,7 +109,7 @@ XKeycodeToKeysym(Display *dpy, int col) { XkbDescRec *xkb; - + if (_XkbUnavailable(dpy)) return _XKeycodeToKeysym(dpy, kc, col); @@ -118,7 +118,7 @@ XKeycodeToKeysym(Display *dpy, xkb = dpy->xkb_info->desc; if ((kc<xkb->min_key_code)||(kc>xkb->max_key_code)) return NoSymbol; - + if (col>3) { int lastSym,tmp,nGrp; @@ -226,8 +226,8 @@ XLookupKeysym(register XKeyEvent *event, int col) } /* - * Not a public entry point -- XkbTranslateKey is an obsolete name - * that is preserved here so that functions linked against the old + * Not a public entry point -- XkbTranslateKey is an obsolete name + * that is preserved here so that functions linked against the old * version will continue to work in a shared library environment. */ int @@ -325,10 +325,10 @@ XkbTranslateKeyCode( register XkbDescPtr xkb, if (mods_rtrn) { *mods_rtrn= type->mods.mask&(~preserve); /* The Motif VTS doesn't get the help callback called if help - * is bound to Shift+<whatever>, and it appears as though it - * is XkbTranslateKeyCode that is causing the problem. The - * core X version of XTranslateKey always OR's in ShiftMask - * and LockMask for mods_rtrn, so this "fix" keeps this behavior + * is bound to Shift+<whatever>, and it appears as though it + * is XkbTranslateKeyCode that is causing the problem. The + * core X version of XTranslateKey always OR's in ShiftMask + * and LockMask for mods_rtrn, so this "fix" keeps this behavior * and solves the VTS problem. */ if ((xkb->dpy)&&(xkb->dpy->xkb_info)&& @@ -365,7 +365,6 @@ XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event) changes= xkbi->changes; else bzero(&changes,sizeof(changes)); XkbNoteMapChanges(&changes,event,XKB_XLIB_MAP_MASK); - LockDisplay(dpy); if ((rtrn=XkbGetMapChanges(dpy,xkbi->desc,&changes))!=Success) { #ifdef DEBUG fprintf(stderr,"Internal Error! XkbGetMapChanges failed:\n"); @@ -376,7 +375,6 @@ XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event) xkbi->flags&= ~XkbMapPending; bzero(&xkbi->changes,sizeof(XkbMapChangesRec)); } - UnlockDisplay(dpy); return rtrn; } return BadMatch; @@ -631,7 +629,7 @@ XkbTranslateKeySym( register Display * dpy, } if (change) { if (n==1) - *sym_rtrn=(*xkb->cvt.MBToKS)(xkb->cvt.MBToKSPriv,buffer,n,0); + *sym_rtrn=(*xkb->cvt.MBToKS)(xkb->cvt.MBToKSPriv,buffer,n,NULL); else *sym_rtrn= NoSymbol; } } @@ -697,7 +695,7 @@ XLookupString ( register XKeyEvent * event, } } } - } + } #ifdef USE_OWN_COMPOSE if ( status ) { @@ -710,7 +708,7 @@ XLookupString ( register XKeyEvent * event, status->compose_ptr = NULL; status->chars_matched = 0; } - if ( ((status->chars_matched>0)&&(status->compose_ptr!=NULL)) || + if ( ((status->chars_matched>0)&&(status->compose_ptr!=NULL)) || XimCompIsComposeKey(*keysym,event->keycode,status) ) { XimCompRtrn rtrn; @@ -816,7 +814,7 @@ XkbLookupKeyBinding( Display * dpy, int nbytes, int * extra_rtrn) { - register struct _XKeytrans *p; + register struct _XKeytrans *p; if (extra_rtrn) *extra_rtrn= 0; @@ -840,7 +838,7 @@ char XkbToControl( char ch ) { register char c = ch; - + if ((c >= '@' && c < '\177') || c == ' ') c &= 0x1F; else if (c == '2') c = '\000'; else if (c >= '3' && c <= '7') c -= ('3' - '\033'); |