From 628b77f6dd946df945074189b19ef5d298245b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Uveri=C4=87?= Date: Mon, 3 May 2021 00:55:33 +0200 Subject: [PATCH] slow down event spamming in main loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dušan Uverić --- instantwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instantwm.c b/instantwm.c index bf981cad..b5c8ace1 100644 --- a/instantwm.c +++ b/instantwm.c @@ -3878,7 +3878,7 @@ run(void) /* main event loop */ XSync(dpy, False); while (running && !XNextEvent(dpy, &ev)) - if (handler[ev.type]) + if (handler[ev.type] && XEventsQueued(dpy, QueuedAlready) < 250) handler[ev.type](&ev); /* call handler */ }