diff options
| -rw-r--r-- | dmenu.c | 13 |
1 files changed, 11 insertions, 2 deletions
| @@ -664,8 +664,17 @@ setup(void) | |||
| 664 | CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); | 664 | CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); |
| 665 | XSetClassHint(dpy, win, &ch); | 665 | XSetClassHint(dpy, win, &ch); |
| 666 | 666 | ||
| 667 | /* open input methods */ | 667 | |
| 668 | xim = XOpenIM(dpy, NULL, NULL, NULL); | 668 | /* input methods */ |
| 669 | if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { | ||
| 670 | XSetLocaleModifiers("@im=local"); | ||
| 671 | if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { | ||
| 672 | XSetLocaleModifiers("@im="); | ||
| 673 | if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) | ||
| 674 | die("XOpenIM failed. Could not open input device.\n"); | ||
| 675 | } | ||
| 676 | } | ||
| 677 | |||
| 669 | xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, | 678 | xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, |
| 670 | XNClientWindow, win, XNFocusWindow, win, NULL); | 679 | XNClientWindow, win, XNFocusWindow, win, NULL); |
| 671 | 680 | ||
