Introduction
Introduction Statistics Contact Development Disclaimer Help
tchanged ban/unban implementation to not move the windows anymore, but map/unma…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit a54cf2ecef2ca83441dccd454c694b92bca42a16
parent 4b9337a01e7f12058ce54ed65d69e64748397498
Author: Anselm R. Garbe <[email protected]>
Date: Sat, 28 Jul 2007 17:18:45 +0200
changed ban/unban implementation to not move the windows anymore, but map/unmap…
Diffstat:
M client.c | 17 +++++++++--------
M config.mk | 2 +-
M dwm.h | 1 +
M event.c | 6 ++++--
4 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/client.c b/client.c
t@@ -98,10 +98,12 @@ attach(Client *c) {
void
ban(Client *c) {
- if (c->isbanned)
+ if(c->isbanned)
return;
- XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
+ XUnmapWindow(dpy, c->win);
+ setclientstate(c, IconicState);
c->isbanned = True;
+ c->unmapped++;
}
void
t@@ -135,7 +137,7 @@ detach(Client *c) {
void
focus(Client *c) {
- if((!c && selscreen)|| (c && !isvisible(c)))
+ if((!c && selscreen) || (c && !isvisible(c)))
for(c = stack; c && !isvisible(c); c = c->snext);
if(sel && sel != c) {
grabbuttons(sel, False);
t@@ -224,9 +226,7 @@ manage(Window w, XWindowAttributes *wa) {
c->isfloating = (rettrans == Success) || c->isfixed;
attach(c);
attachstack(c);
- ban(c);
- XMapWindow(dpy, w);
- setclientstate(c, NormalState);
+ c->isbanned = True;
focus(c);
lt->arrange();
}
t@@ -308,9 +308,10 @@ togglefloating(const char *arg) {
void
unban(Client *c) {
- if (!c->isbanned)
+ if(!c->isbanned)
return;
- XMoveWindow(dpy, c->win, c->x, c->y);
+ XMapWindow(dpy, c->win);
+ setclientstate(c, NormalState);
c->isbanned = False;
}
diff --git a/config.mk b/config.mk
t@@ -1,5 +1,5 @@
# dwm version
-VERSION = 4.3
+VERSION = 4.4
# Customize below to fit your system
diff --git a/dwm.h b/dwm.h
t@@ -48,6 +48,7 @@ struct Client {
int rx, ry, rw, rh; /* revert geometry */
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int minax, maxax, minay, maxay;
+ int unmapped;
long flags;
unsigned int border, oldborder;
Bool isbanned, isfixed, ismax, isfloating;
diff --git a/event.c b/event.c
t@@ -336,8 +336,10 @@ unmapnotify(XEvent *e) {
Client *c;
XUnmapEvent *ev = &e->xunmap;
- if((c = getclient(ev->window)))
- unmanage(c);
+ if((c = getclient(ev->window)) && (ev->event == root)) {
+ if(ev->send_event || c->unmapped-- == 0)
+ unmanage(c);
+ }
}
/* extern */
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.