commit - 153aaf88bf9bf5c6c4b118bd871f8cf1eafdcab5
commit + f5036b90efd9423d805923a0bc73cd54e30e72ab
blob - f8031497c8e116a9c6e045857d679e75445fd033
blob + ae56f4fbced707105d4cbfbf4faabcaee6dd6ffc
--- dmenu.c
+++ dmenu.c
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
XSetClassHint(dpy, win, &ch);
- /* open input methods */
- xim = XOpenIM(dpy, NULL, NULL, NULL);
+
+ /* input methods */
+ if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) {
+ XSetLocaleModifiers("@im=local");
+ if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) {
+ XSetLocaleModifiers("@im=");
+ if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
+ die("XOpenIM failed. Could not open input device.\n");
+ }
+ }
+
xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, win, XNFocusWindow, win, NULL);