diff options
author | John Ankarstrom <john@ankarstrom.se> | 2021-07-01 18:50:46 +0200 |
---|---|---|
committer | John Ankarstrom <john@ankarstrom.se> | 2021-07-01 18:51:17 +0200 |
commit | 45b9e67735752578bafe7d220c0175273847a0f0 (patch) | |
tree | ccd9a55db974bd29b5f72e6dc050b0643b3407af | |
parent | d9d02f2db0b6b7df4fc118cebd913ea7cd2f6e1c (diff) | |
download | dwim-45b9e67735752578bafe7d220c0175273847a0f0.tar.gz |
xchord: Block until event
Otherwise, xchord takes up 100% of the CPU.
-rw-r--r-- | xchord.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)) |