Skip to content

Commit

Permalink
slow down event spamming in main loop
Browse files Browse the repository at this point in the history
Signed-off-by: Dušan Uverić <[email protected]>
  • Loading branch information
uvera committed May 2, 2021
1 parent e78f509 commit 628b77f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion instantwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}

Expand Down

0 comments on commit 628b77f

Please sign in to comment.