aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/dmenu.c b/dmenu.c
index 6d1cdf0..895542d 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -230,11 +230,13 @@ insert(const char *str, ssize_t n) {
230void 230void
231keypress(XKeyEvent *ev) { 231keypress(XKeyEvent *ev) {
232 char buf[32]; 232 char buf[32];
233 KeySym ksym;
234 int len; 233 int len;
234 KeySym ksym = NoSymbol;
235 Status status; 235 Status status;
236 236
237 len = XmbLookupString(xic, ev, buf, sizeof(buf), &ksym, &status); 237 len = XmbLookupString(xic, ev, buf, sizeof buf, &ksym, &status);
238 if(status == XBufferOverflow)
239 return;
238 if(ev->state & ControlMask) { 240 if(ev->state & ControlMask) {
239 KeySym lower, upper; 241 KeySym lower, upper;
240 242
@@ -549,10 +551,10 @@ setup(void) {
549 DefaultVisual(dc->dpy, screen), 551 DefaultVisual(dc->dpy, screen),
550 CWOverrideRedirect | CWBackPixmap | CWEventMask, &swa); 552 CWOverrideRedirect | CWBackPixmap | CWEventMask, &swa);
551 553
552 /* input methods */ 554 /* input methods */
553 xim = XOpenIM(dc->dpy, NULL, NULL, NULL); 555 xim = XOpenIM(dc->dpy, NULL, NULL, NULL);
554 xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, 556 xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
555 XNClientWindow, win, XNFocusWindow, win, NULL); 557 XNClientWindow, win, XNFocusWindow, win, NULL);
556 558
557 XMapRaised(dc->dpy, win); 559 XMapRaised(dc->dpy, win);
558 resizedc(dc, mw, mh); 560 resizedc(dc, mw, mh);