summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorYann Droneaud <yann@droneaud.fr>2011-10-09 17:56:45 +0200
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-11 09:56:54 -0700
commit10992cb8dc5e4d938e7e5a633b68a81b5875f3ba (patch)
treec433aa00243400d7d4c1f858ca36aca943426c3b /modules
parentf2651e03f3295a453a2965c3749bc8b6e66f1c09 (diff)
downloadxorg-lib-libX11-10992cb8dc5e4d938e7e5a633b68a81b5875f3ba.tar.gz
Return name instead of value in XGetIMValues() and XSetIMValues()
As stated in man page (XOpenIM) and Xlib documentation (chapter 13.5.3), XGetIMValues() and XSetImValues() "returns the name of the first argument that could not be obtained." But currently, err = XGetIMValues(im, "invalid", &arg, NULL); returns &arg instead of "invalid". This patch fixes https://bugs.freedesktop.org/show_bug.cgi?id=12897 Signed-off-by: Yann Droneaud <yann@droneaud.fr> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/im/ximcp/imRm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/im/ximcp/imRm.c b/modules/im/ximcp/imRm.c
index da1207ca..53b2458e 100644
--- a/modules/im/ximcp/imRm.c
+++ b/modules/im/ximcp/imRm.c
@@ -2250,17 +2250,17 @@ _XimSetIMValueData(
for(p = values; p->name != NULL; p++) {
if(!(res = _XimGetResourceListRec(res_list, list_num, p->name))) {
- return p->value;
+ return p->name;
}
check = _XimCheckIMMode(res, XIM_SETIMVALUES);
if(check == XIM_CHECK_INVALID) {
continue;
} else if (check == XIM_CHECK_ERROR) {
- return p->value;
+ return p->name;
}
if(!_XimEncodeLocalIMAttr(res, top, p->value)) {
- return p->value;
+ return p->name;
}
}
return NULL;
@@ -2280,17 +2280,17 @@ _XimGetIMValueData(
for(p = values; p->name != NULL; p++) {
if(!(res = _XimGetResourceListRec(res_list, list_num, p->name))) {
- return p->value;
+ return p->name;
}
check = _XimCheckIMMode(res, XIM_GETIMVALUES);
if(check == XIM_CHECK_INVALID) {
continue;
} else if (check == XIM_CHECK_ERROR) {
- return p->value;
+ return p->name;
}
if(!_XimDecodeLocalIMAttr(res, top, p->value)) {
- return p->value;
+ return p->name;
}
}
return NULL;