Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
update
[dwm.git]
/
dwm.c
diff --git
a/dwm.c
b/dwm.c
index
a2c1e00
..
7d19b07
100644
(file)
--- 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 toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
static void unfocus(Client *c);
-static void unmanage(Client *c, Bool
is
destroyed);
+static void unmanage(Client *c, Bool destroyed);
static void unmapnotify(XEvent *e);
static void updategeom(void);
static void updatebarpos(Monitor *m);
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);
}
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);
XKillClient(dpy, selmon->sel->win);
+ XSync(dpy, False);
+ XSetErrorHandler(xerror);
+ XUngrabServer(dpy);
+ }
}
void
}
void
@@
-1626,13
+1633,13
@@
unfocus(Client *c) {
}
void
}
void
-unmanage(Client *c, Bool
is
destroyed) {
+unmanage(Client *c, Bool destroyed) {
XWindowChanges wc;
/* The server grab construct avoids race conditions. */
detach(c);
detachstack(c);
XWindowChanges wc;
/* The server grab construct avoids race conditions. */
detach(c);
detachstack(c);
- if(!
is
destroyed) {
+ if(!destroyed) {
wc.border_width = c->oldbw;
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
wc.border_width = c->oldbw;
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
@@
-1645,6
+1652,7
@@
unmanage(Client *c, Bool isdestroyed) {
}
free(c);
focus(NULL);
}
free(c);
focus(NULL);
+ arrange();
}
void
}
void