tAdding error checks for XCreateIC and XOpenIM. - st - [fork] customized build … | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 3c6ec1995d8ec4d8d5da7ca81d15adfdb08086aa | |
parent 2696f8187509eb94644bbac5b05348e37c391bea | |
Author: Christoph Lohmann <[email protected]> | |
Date: Tue, 11 Dec 2012 08:32:08 +0100 | |
Adding error checks for XCreateIC and XOpenIM. | |
Diffstat: | |
M TODO | 1 - | |
M st.c | 4 ++++ | |
2 files changed, 4 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/TODO b/TODO | |
t@@ -17,7 +17,6 @@ code & interface | |
bugs | |
---- | |
-* handle XOpenMI() errors | |
* fix shift up/down (shift selection in emacs) | |
* fix selection paste for xatom STRING | |
* fix umlaut handling in settitle | |
diff --git a/st.c b/st.c | |
t@@ -2431,9 +2431,13 @@ xinit(void) { | |
/* input methods */ | |
xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL); | |
+ if(xw.xim == NULL) | |
+ die("XOpenIM failed. Could not open input device.\n"); | |
xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing | |
| XIMStatusNothing, XNClientWindow,… | |
XNFocusWindow, xw.win, NULL); | |
+ if(xw.xic == NULL) | |
+ die("XCreateIC failed. Could not obtain input method.\n"); | |
/* white cursor, black outline */ | |
cursor = XCreateFontCursor(xw.dpy, XC_xterm); |