changed ban/unban implementation to not move the windows anymore, but map/unmap them instead - PLEASE TEST THIS
This commit is contained in:
parent
4b9337a01e
commit
a54cf2ecef
11
client.c
11
client.c
|
@ -100,8 +100,10 @@ void
|
||||||
ban(Client *c) {
|
ban(Client *c) {
|
||||||
if(c->isbanned)
|
if(c->isbanned)
|
||||||
return;
|
return;
|
||||||
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
|
XUnmapWindow(dpy, c->win);
|
||||||
|
setclientstate(c, IconicState);
|
||||||
c->isbanned = True;
|
c->isbanned = True;
|
||||||
|
c->unmapped++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -224,9 +226,7 @@ manage(Window w, XWindowAttributes *wa) {
|
||||||
c->isfloating = (rettrans == Success) || c->isfixed;
|
c->isfloating = (rettrans == Success) || c->isfixed;
|
||||||
attach(c);
|
attach(c);
|
||||||
attachstack(c);
|
attachstack(c);
|
||||||
ban(c);
|
c->isbanned = True;
|
||||||
XMapWindow(dpy, w);
|
|
||||||
setclientstate(c, NormalState);
|
|
||||||
focus(c);
|
focus(c);
|
||||||
lt->arrange();
|
lt->arrange();
|
||||||
}
|
}
|
||||||
|
@ -310,7 +310,8 @@ void
|
||||||
unban(Client *c) {
|
unban(Client *c) {
|
||||||
if(!c->isbanned)
|
if(!c->isbanned)
|
||||||
return;
|
return;
|
||||||
XMoveWindow(dpy, c->win, c->x, c->y);
|
XMapWindow(dpy, c->win);
|
||||||
|
setclientstate(c, NormalState);
|
||||||
c->isbanned = False;
|
c->isbanned = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# dwm version
|
# dwm version
|
||||||
VERSION = 4.3
|
VERSION = 4.4
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
|
|
1
dwm.h
1
dwm.h
|
@ -48,6 +48,7 @@ struct Client {
|
||||||
int rx, ry, rw, rh; /* revert geometry */
|
int rx, ry, rw, rh; /* revert geometry */
|
||||||
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
||||||
int minax, maxax, minay, maxay;
|
int minax, maxax, minay, maxay;
|
||||||
|
int unmapped;
|
||||||
long flags;
|
long flags;
|
||||||
unsigned int border, oldborder;
|
unsigned int border, oldborder;
|
||||||
Bool isbanned, isfixed, ismax, isfloating;
|
Bool isbanned, isfixed, ismax, isfloating;
|
||||||
|
|
4
event.c
4
event.c
|
@ -336,9 +336,11 @@ unmapnotify(XEvent *e) {
|
||||||
Client *c;
|
Client *c;
|
||||||
XUnmapEvent *ev = &e->xunmap;
|
XUnmapEvent *ev = &e->xunmap;
|
||||||
|
|
||||||
if((c = getclient(ev->window)))
|
if((c = getclient(ev->window)) && (ev->event == root)) {
|
||||||
|
if(ev->send_event || c->unmapped-- == 0)
|
||||||
unmanage(c);
|
unmanage(c);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* extern */
|
/* extern */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue