diff options
| author | uint <abhinav.prsai@gmail.com> | 2025-12-15 18:19:07 +0000 |
|---|---|---|
| committer | uint <abhinav.prsai@gmail.com> | 2025-12-15 18:19:07 +0000 |
| commit | 835ac229702417117ad58715d291f0850efc0fcb (patch) | |
| tree | e77cac5ac31f5557d1758c4736b62ed5f90fea34 | |
| parent | 1ef9f24c212096e940218cd7787dd140234bb035 (diff) | |
| -rw-r--r-- | xnap.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -254,6 +254,9 @@ void run(void) p.y0 = p.y1 = p.ly = ev.xbutton.y_root; } else if (ev.type == MotionNotify && p.sel) { /* dragging selection */ + /* keep only latest motion ev */ + while (XCheckTypedEvent(dpy, MotionNotify, &ev)); + /* remove old rectangle */ drawrect(); @@ -269,6 +272,7 @@ void run(void) else if (ev.type == ButtonRelease && p.sel && b == Button1) { /* release selection */ /* remove final rectangle */ drawrect(); + XSync(dpy, False); p.sel = False; capsel(); |
