diff options
author | Christoph Lohmann <20h@r-36.net> | 2012-12-11 08:32:08 +0100 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2012-12-11 08:32:08 +0100 |
commit | 3c6ec1995d8ec4d8d5da7ca81d15adfdb08086aa (patch) | |
tree | e9370a7bbc86160d0a25768d8f35dccf11147f2e /st.c | |
parent | 2696f8187509eb94644bbac5b05348e37c391bea (diff) | |
download | st-3c6ec1995d8ec4d8d5da7ca81d15adfdb08086aa.tar.gz |
Adding error checks for XCreateIC and XOpenIM.
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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, xw.win, 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); |