[hackers] [st] A fix for the XopenIM() errors. || Christoph Lohmann
commit 4e14a4a97f7f7ef134fdc25d2fa34c8db7bb6e6c
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Tue Jan 1 13:15:43 2013 +0100
A fix for the XopenIM() errors.
diff --git a/st.c b/st.c
index 7ceed75..163f160 100644
--- a/st.c
+++ b/st.c
_AT_@ -2503,9 +2503,17 @@ xinit(void) {
xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap);
/* input methods */
- xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL);
- if(xw.xim == NULL)
- die("XOpenIM failed. Could not open input device.
");
+ if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) {
+ XSetLocaleModifiers("_AT_im=local");
+ if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) {
+ XSetLocaleModifiers("_AT_im=");
+ if((xw.xim = XOpenIM(xw.dpy,
+ NULL, NULL, NULL)) == NULL) {
+ die("XOpenIM failed. Could not open input"
+ " device.
");
+ }
+ }
+ }
xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing
| XIMStatusNothing, XNClientWindow, xw.win,
XNFocusWindow, xw.win, NULL);
Received on Tue Jan 01 2013 - 13:17:40 CET
This archive was generated by hypermail 2.3.0
: Tue Jan 01 2013 - 13:24:07 CET