From 45b9e67735752578bafe7d220c0175273847a0f0 Mon Sep 17 00:00:00 2001 From: John Ankarstrom Date: Thu, 1 Jul 2021 18:50:46 +0200 Subject: xchord: Block until event Otherwise, xchord takes up 100% of the CPU. --- xchord.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xchord.c b/xchord.c index 7df852f..59d3f52 100644 --- a/xchord.c +++ b/xchord.c @@ -66,6 +66,8 @@ main(int argc, char *argv[]) /* watch for events */ for (;;) { + XNextEvent(dpy, &ev); + XPutBackEvent(dpy, &ev); if (!XCheckTypedEvent(dpy, GenericEvent, &ev)) continue; if (cookie->type != GenericEvent || !XGetEventData(dpy, cookie)) -- cgit v1.2.3