diff options
| author | Christoph Lohmann <20h@r-36.net> | 2013-01-01 13:15:43 +0100 |
|---|---|---|
| committer | Christoph Lohmann <20h@r-36.net> | 2013-01-01 13:15:43 +0100 |
| commit | 4e14a4a97f7f7ef134fdc25d2fa34c8db7bb6e6c (patch) | |
| tree | 6a6712face3c4eea19940838bd2d0072120d384a | |
| parent | c99db5b0170555c5bb0359ac8a8229cdada64b30 (diff) | |
| download | st-4e14a4a97f7f7ef134fdc25d2fa34c8db7bb6e6c.tar.gz st-4e14a4a97f7f7ef134fdc25d2fa34c8db7bb6e6c.zip | |
A fix for the XopenIM() errors.
| -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); |
