summaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/dmenu.c b/dmenu.c
index d67d639..a2148fb 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -100,7 +100,7 @@ cleanup(void)
{
size_t i;
- XUngrabKey(dpy, AnyKey, AnyModifier, root);
+ XUngrabKeyboard(dpy, CurrentTime);
for (i = 0; i < SchemeLast; i++)
free(scheme[i]);
for (i = 0; items && items[i].text; ++i)
@@ -558,10 +558,10 @@ readstdin(void)
size_t i, itemsiz = 0, linesiz = 0;
ssize_t len;
- if(passwd){
- inputw = lines = 0;
- return;
- }
+ if(passwd){
+ inputw = lines = 0;
+ return;
+ }
/* read each line from stdin and add it to the item list */
for (i = 0; (len = getline(&line, &linesiz, stdin)) != -1; i++) {
@@ -700,7 +700,6 @@ setup(void)
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
XSetClassHint(dpy, win, &ch);
-
/* input methods */
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
die("XOpenIM failed: could not open input device");