aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/XKBBind.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-08-27 00:04:03 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-10 22:52:30 +0200
commitaf1f7cee091216b445ed6e697301cd640c70d883 (patch)
tree82bdb8ff7e78ecfd9dec3712b6614de173523020 /nx-X11/lib/X11/XKBBind.c
parent3e75c816d2439b2a565418c0b298d056ce2437bc (diff)
downloadnx-libs-af1f7cee091216b445ed6e697301cd640c70d883.tar.gz
nx-libs-af1f7cee091216b445ed6e697301cd640c70d883.tar.bz2
nx-libs-af1f7cee091216b445ed6e697301cd640c70d883.zip
Lift XKB*.c to libX11 1.3.4
Diffstat (limited to 'nx-X11/lib/X11/XKBBind.c')
-rw-r--r--nx-X11/lib/X11/XKBBind.c30
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');