jwm is telling me not to trust client :)

This commit is contained in:
Nishi 2025-12-05 14:54:39 +09:00
commit 67797e52d2
Signed by: nishi
GPG key ID: 27EF69B208EB9343

View file

@ -284,11 +284,11 @@ void loop_x(void) {
if(windows[i].client == ev.xunmap.window) {
XWindowAttributes xwa;
XGetWindowAttributes(xdisplay, windows[i].frame->lowlevel->x11.window, &xwa);
pthread_mutex_lock(&xmutex);
XReparentWindow(xdisplay, windows[i].client, DefaultRootWindow(xdisplay), xwa.x, xwa.y);
pthread_mutex_unlock(&xmutex);
if(XGetWindowAttributes(xdisplay, windows[i].frame->lowlevel->x11.window, &xwa)) {
pthread_mutex_lock(&xmutex);
XReparentWindow(xdisplay, windows[i].client, DefaultRootWindow(xdisplay), xwa.x, xwa.y);
pthread_mutex_unlock(&xmutex);
}
wm_destroy(windows[i].frame);
arrdel(windows, i);