This is an automated email generated because a ref change occurred in the
git repository for project wmaker-crm.git.
The branch, master has been updated
via 90ce10998cd1d9bf8970796d2dae7ca0200ef03e (commit)
via f18de447f6df235068be395848fa637bd267d657 (commit)
from b69c9db245dc2a39d818bce0ec05ab02907c2958 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 90ce10998cd1d9bf8970796d2dae7ca0200ef03e
Author: David Maciejak <
david.m...@gmail.com>
Date: Sat, 13 Jun 2026 09:29:04 -0400
URL: <
https://repo.or.cz/wmaker-crm.git/90ce10998cd1d9bf>
wmaker: ignore queued motion before the screenshot anchor click
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 b8f83af9d32e..ba007cca1fd4 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) {
commit f18de447f6df235068be395848fa637bd267d657
Author: David Maciejak <
david.m...@gmail.com>
Date: Wed, 10 Jun 2026 16:37:35 -0400
URL: <
https://repo.or.cz/wmaker-crm.git/f18de447f6df2350>
wmaker: grab the keyboard during partial screenshot selection
imageCaptureArea() already looked for XK_Escape in its event loop but
only grabbed the pointer, so the KeyPress went to the focused client
and the cancel branch was unreachable. Grab the keyboard for the
duration of the rubber-band selection, erase the XOR rectangle when
Escape aborts mid-drag, and release the keyboard on every exit path.
---
src/screen.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/screen.c b/src/screen.c
index 8cb27487c0db..b8f83af9d32e 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1143,6 +1143,7 @@ static XImage *imageCaptureArea(WScreen *scr)
GrabModeAsync, None, wPreferences.cursor[WCUR_CAPTURE], CurrentTime) != Success) {
return NULL;
}
+ XGrabKeyboard(dpy, scr->root_win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
XGrabServer(dpy);
@@ -1162,6 +1163,7 @@ static XImage *imageCaptureArea(WScreen *scr)
if (w > 0 && h > 0) {
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
XUngrabServer(dpy);
+ XUngrabKeyboard(dpy, CurrentTime);
XUngrabPointer(dpy, CurrentTime);
return XGetImage(dpy, scr->root_win, x, y, w, h, AllPlanes, ZPixmap);
}
@@ -1186,8 +1188,11 @@ static XImage *imageCaptureArea(WScreen *scr)
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
break;
case KeyPress:
- if (W_KeycodeToKeysym(dpy, event.xkey.keycode, 0) == XK_Escape)
+ if (W_KeycodeToKeysym(dpy, event.xkey.keycode, 0) == XK_Escape) {
+ if (w > 0 && h > 0)
+ XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
quit = 1;
+ }
break;
default:
WMHandleEvent(&event);
@@ -1196,6 +1201,7 @@ static XImage *imageCaptureArea(WScreen *scr)
}
XUngrabServer(dpy);
+ XUngrabKeyboard(dpy, CurrentTime);
XUngrabPointer(dpy, CurrentTime);
return NULL;
}
-----------------------------------------------------------------------
Summary of changes:
src/screen.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
repo.or.cz automatic notification. Contact project admin
crm...@gmail.com
if you want to unsubscribe, or site admin
ad...@repo.or.cz if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")