X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.c;h=da5f78d58c37247abac606c674a5dce7d353390d;hb=3c6ec1995d8ec4d8d5da7ca81d15adfdb08086aa;hp=fc64a779d35346b6394fa8df332230b388318166;hpb=78215c8ee0f4cb62655730260520f185ce97c620;p=st.git diff --git a/st.c b/st.c index fc64a77..da5f78d 100644 --- a/st.c +++ b/st.c @@ -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); @@ -2742,12 +2746,13 @@ kmap(KeySym k, uint state) { continue; if(term.numlock && kp->appkey == 2) continue; - } else if (kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) { + } else if(kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) { continue; } if((kp->appcursor < 0 && IS_SET(MODE_APPCURSOR)) || - (kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR))) { + (kp->appcursor > 0 + && !IS_SET(MODE_APPCURSOR))) { continue; }