diff options
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 14 |
1 files changed, 11 insertions, 3 deletions
| @@ -2503,9 +2503,17 @@ xinit(void) { | |||
| 2503 | xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); | 2503 | xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); |
| 2504 | 2504 | ||
| 2505 | /* input methods */ | 2505 | /* input methods */ |
| 2506 | xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL); | 2506 | if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { |
| 2507 | if(xw.xim == NULL) | 2507 | XSetLocaleModifiers("@im=local"); |
| 2508 | die("XOpenIM failed. Could not open input device.\n"); | 2508 | if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { |
| 2509 | XSetLocaleModifiers("@im="); | ||
| 2510 | if((xw.xim = XOpenIM(xw.dpy, | ||
| 2511 | NULL, NULL, NULL)) == NULL) { | ||
| 2512 | die("XOpenIM failed. Could not open input" | ||
| 2513 | " device.\n"); | ||
| 2514 | } | ||
| 2515 | } | ||
| 2516 | } | ||
| 2509 | xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing | 2517 | xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing |
| 2510 | | XIMStatusNothing, XNClientWindow, xw.win, | 2518 | | XIMStatusNothing, XNClientWindow, xw.win, |
| 2511 | XNFocusWindow, xw.win, NULL); | 2519 | XNFocusWindow, xw.win, NULL); |
