summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Casarin <jb55@jb55.com>2018-07-08 12:19:57 -0700
committerWilliam Casarin <jb55@jb55.com>2018-07-08 12:19:57 -0700
commit83dbfd357c0a0d7798ad4ccf788476e56a5d5dbf (patch)
tree3482921b88dc6c7a526e8156e6a915577d3359a8
parent9a0db85c807a28fdcc49cb11e6ce9e3e9c404dd1 (diff)
cmdtree: close on escape
-rw-r--r--cmdtree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmdtree.c b/cmdtree.c
index 167c64b..e5f851b 100644
--- a/cmdtree.c
+++ b/cmdtree.c
@@ -57,7 +57,7 @@ setup()
mw = wa.width;
lines = MAX(lines, 0);
/* mh = (lines + 1) * bh; */
- mh = 50;
+ mh = 100;
swa.override_redirect = True;
/* swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; */
@@ -119,7 +119,8 @@ run() {
if (e.type == KeyPress) {
XmbLookupString(xic, (XKeyEvent*)&e, buf,
sizeof buf, &ksym, &status);
- if (ksym == XK_q) break;
+ if (ksym == XK_q) done = 1;
+ if (ksym == XK_Escape) done = 1;
}
}