[PATCH 2/2] wmaker: ignore queued motion before the screenshot anchor click
1 view
Skip to first unread message
david.m...@gmail.com
unread,
Jun 13, 2026, 9:39:06 AMJun 13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Window Maker Development
imageCaptureArea() consumed any MotionNotify still queued from the root window before Button1 set the anchor point, with xp,yp still -1 the rectangle math anchored the XOR wireframe at (-1,-1) and drew a box from the top-left corner to the pointer. Drop motion events until the press has recorded an anchor. --- src/screen.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/screen.c b/src/screen.c index b8f83af9..ba007cca 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1170,6 +1170,10 @@ static XImage *imageCaptureArea(WScreen *scr) } break; case MotionNotify: +/* drop stale root MotionNotify still queued from before + * the grab, otherwise the rectangle anchors at (-1,-1) */ +if (xp < 0) +break; XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h); x = event.xmotion.x_root; if (x < xp) { -- 2.43.0