diff options
Diffstat (limited to 'x.c')
| -rw-r--r-- | x.c | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -1833,7 +1833,7 @@ void | |||
| 1833 | kpress(XEvent *ev) | 1833 | kpress(XEvent *ev) |
| 1834 | { | 1834 | { |
| 1835 | XKeyEvent *e = &ev->xkey; | 1835 | XKeyEvent *e = &ev->xkey; |
| 1836 | KeySym ksym; | 1836 | KeySym ksym = NoSymbol; |
| 1837 | char buf[64], *customkey; | 1837 | char buf[64], *customkey; |
| 1838 | int len; | 1838 | int len; |
| 1839 | Rune c; | 1839 | Rune c; |
| @@ -1843,10 +1843,13 @@ kpress(XEvent *ev) | |||
| 1843 | if (IS_SET(MODE_KBDLOCK)) | 1843 | if (IS_SET(MODE_KBDLOCK)) |
| 1844 | return; | 1844 | return; |
| 1845 | 1845 | ||
| 1846 | if (xw.ime.xic) | 1846 | if (xw.ime.xic) { |
| 1847 | len = XmbLookupString(xw.ime.xic, e, buf, sizeof buf, &ksym, &status); | 1847 | len = XmbLookupString(xw.ime.xic, e, buf, sizeof buf, &ksym, &status); |
| 1848 | else | 1848 | if (status == XBufferOverflow) |
| 1849 | return; | ||
| 1850 | } else { | ||
| 1849 | len = XLookupString(e, buf, sizeof buf, &ksym, NULL); | 1851 | len = XLookupString(e, buf, sizeof buf, &ksym, NULL); |
| 1852 | } | ||
| 1850 | /* 1. shortcuts */ | 1853 | /* 1. shortcuts */ |
| 1851 | for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) { | 1854 | for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) { |
| 1852 | if (ksym == bp->keysym && match(bp->mod, e->state)) { | 1855 | if (ksym == bp->keysym && match(bp->mod, e->state)) { |
