]> git.mdlowis.com Git - projs/tide.git/commitdiff
compress motion events to just process the latest
authorMichael D. Lowis <mike@mdlowis.com>
Mon, 23 Apr 2018 02:30:53 +0000 (22:30 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Mon, 23 Apr 2018 02:30:53 +0000 (22:30 -0400)
lib/x11.c

index 1b8aa47fa417e28397d4b078843c690d0a7bbe06..6828d2b42952a0ef98d8fa0bec94d442b96d6a24 100644 (file)
--- a/lib/x11.c
+++ b/lib/x11.c
@@ -389,6 +389,7 @@ static void xbtnrelease(XEvent* e) {
 }
 
 static void xbtnmotion(XEvent* e) {
+    while (XCheckTypedEvent(X.display, MotionNotify, e));
     X.now = e->xbutton.time;
     size_t row, col;
     KeyBtnState = e->xbutton.state;