aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-10-07 22:16:24 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:27 +0200
commita2fded2e334eb2f68b5ee6b44463daf58bd8b32c (patch)
tree08a94eb86f5223710348e5e4b9da772bb93330b2
parentbd43a06402b7499a74de0d4fb5ef8330b490b38f (diff)
downloadnx-libs-a2fded2e334eb2f68b5ee6b44463daf58bd8b32c.tar.gz
nx-libs-a2fded2e334eb2f68b5ee6b44463daf58bd8b32c.tar.bz2
nx-libs-a2fded2e334eb2f68b5ee6b44463daf58bd8b32c.zip
Revert incomplete "Fix status reporting for braille patterns"
This reverts commit 8866f80d9f42e02093058cab027edbf127118105. That commit had been edited and was incomplete, by reverting and re-applying we get it right.
-rw-r--r--nx-X11/lib/X11/imLcLkup.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/nx-X11/lib/X11/imLcLkup.c b/nx-X11/lib/X11/imLcLkup.c
index 51c1f2ed8..50e09d2e7 100644
--- a/nx-X11/lib/X11/imLcLkup.c
+++ b/nx-X11/lib/X11/imLcLkup.c
@@ -71,21 +71,12 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
if(status) *status = XBufferOverflow;
return(ret);
}
- if(keysym) *keysym = XK_braille_blank | pattern;
- if(ret > 0) {
- if (keysym) {
- if(status) *status = XLookupBoth;
- } else {
- if(status) *status = XLookupChars;
- }
- memcpy(buffer, mb, ret);
- } else {
- if(keysym) {
- if(status) *status = XLookupKeySym;
- } else {
- if(status) *status = XLookupNone;
- }
- }
+ if(keysym) {
+ *keysym = XK_braille_blank | pattern;
+ if(status) *status = XLookupBoth;
+ } else
+ if(status) *status = XLookupChars;
+ memcpy(buffer, mb, ret);
} else { /* Composed Event */
ret = strlen(&mb[b[ic->private.local.composed].mb]);
if(ret > bytes) {
@@ -226,11 +217,6 @@ _XimLocalUtf8LookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
buffer[0] = 0xe0 | ((BRL_UC_ROW >> 12) & 0x0f);
buffer[1] = 0x80 | ((BRL_UC_ROW >> 8) & 0x30) | (pattern >> 6);
buffer[2] = 0x80 | (pattern & 0x3f);
- if(keysym) {
- *keysym = XK_braille_blank | pattern;
- if(status) *status = XLookupBoth;
- } else
- if(status) *status = XLookupChars;
} else { /* Composed Event */
ret = strlen(&utf8[b[ic->private.local.composed].utf8]);
if(ret > bytes) {