X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;h=cb296b5c99fd47c395c7c322592e12a1fa650050;hp=a2c1e00bc4fa5cfacf3d3ca55753421de5e9e5cd;hb=01056b66369f650d02145f27d1399141f93015df;hpb=a3a859b4e93d65fd22619449d18e0437d5c2774b diff --git a/dwm.c b/dwm.c index a2c1e00..cb296b5 100644 --- a/dwm.c +++ b/dwm.c @@ -218,7 +218,7 @@ static void togglefloating(const Arg *arg); static void toggletag(const Arg *arg); static void toggleview(const Arg *arg); static void unfocus(Client *c); -static void unmanage(Client *c, Bool isdestroyed); +static void unmanage(Client *c, Bool destroyed); static void unmapnotify(XEvent *e); static void updategeom(void); static void updatebarpos(Monitor *m); @@ -1039,8 +1039,15 @@ killclient(const Arg *arg) { ev.xclient.data.l[1] = CurrentTime; XSendEvent(dpy, selmon->sel->win, False, NoEventMask, &ev); } - else + else { + XGrabServer(dpy); + XSetErrorHandler(xerrordummy); + XSetCloseDownMode(dpy, DestroyAll); XKillClient(dpy, selmon->sel->win); + XSync(dpy, False); + XSetErrorHandler(xerror); + XUngrabServer(dpy); + } } void @@ -1626,13 +1633,13 @@ unfocus(Client *c) { } void -unmanage(Client *c, Bool isdestroyed) { +unmanage(Client *c, Bool destroyed) { XWindowChanges wc; /* The server grab construct avoids race conditions. */ detach(c); detachstack(c); - if(!isdestroyed) { + if(!destroyed) { wc.border_width = c->oldbw; XGrabServer(dpy); XSetErrorHandler(xerrordummy);