tfixing the settags issue, preparing 1.7.1 - dwm - [fork] customized build of d… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 6092aa977e9cc87bcf72713af8e7c698ddea4b56 | |
parent c9cc2b385aade3ce7db1404f4b5f8cd6e41e6bae | |
Author: Anselm R. Garbe <[email protected]> | |
Date: Wed, 27 Sep 2006 17:18:46 +0200 | |
fixing the settags issue, preparing 1.7.1 | |
Diffstat: | |
M client.c | 30 +++++++++++++++--------------- | |
M config.mk | 2 +- | |
M dwm.h | 1 + | |
M event.c | 1 + | |
4 files changed, 18 insertions(+), 16 deletions(-) | |
--- | |
diff --git a/client.c b/client.c | |
t@@ -54,19 +54,6 @@ grabbuttons(Client *c, Bool focused) { | |
GrabModeAsync, GrabModeSync, None, None); | |
} | |
-static void | |
-resizetitle(Client *c) { | |
- c->tw = textw(c->name); | |
- if(c->tw > c->w) | |
- c->tw = c->w + 2; | |
- c->tx = c->x + c->w - c->tw + 2; | |
- c->ty = c->y; | |
- if(isvisible(c)) | |
- XMoveResizeWindow(dpy, c->twin, c->tx, c->ty, c->tw, c->th); | |
- else | |
- XMoveResizeWindow(dpy, c->twin, c->tx + 2 * sw, c->ty, c->tw, … | |
-} | |
- | |
static int | |
xerrordummy(Display *dsply, XErrorEvent *ee) { | |
return 0; | |
t@@ -250,11 +237,13 @@ manage(Window w, XWindowAttributes *wa) { | |
CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); | |
grabbuttons(c, False); | |
+ updatetitle(c); | |
settags(c, getclient(trans)); | |
if(!c->isfloat) | |
c->isfloat = trans | |
|| (c->maxw && c->minw && | |
c->maxw == c->minw && c->maxh == c->minh); | |
+ resizetitle(c); | |
if(clients) | |
clients->prev = c; | |
t@@ -262,7 +251,6 @@ manage(Window w, XWindowAttributes *wa) { | |
c->snext = stack; | |
stack = clients = c; | |
- updatetitle(c); | |
ban(c); | |
XMapWindow(dpy, c->win); | |
XMapWindow(dpy, c->twin); | |
t@@ -321,6 +309,19 @@ resize(Client *c, Bool sizehints, Corner sticky) { | |
} | |
void | |
+resizetitle(Client *c) { | |
+ c->tw = textw(c->name); | |
+ if(c->tw > c->w) | |
+ c->tw = c->w + 2; | |
+ c->tx = c->x + c->w - c->tw + 2; | |
+ c->ty = c->y; | |
+ if(isvisible(c)) | |
+ XMoveResizeWindow(dpy, c->twin, c->tx, c->ty, c->tw, c->th); | |
+ else | |
+ XMoveResizeWindow(dpy, c->twin, c->tx + 2 * sw, c->ty, c->tw, … | |
+} | |
+ | |
+void | |
updatesize(Client *c) { | |
long msize; | |
XSizeHints size; | |
t@@ -382,7 +383,6 @@ updatetitle(Client *c) { | |
} | |
} | |
XFree(name.value); | |
- resizetitle(c); | |
} | |
void | |
diff --git a/config.mk b/config.mk | |
t@@ -1,5 +1,5 @@ | |
# dwm version | |
-VERSION = 1.7 | |
+VERSION = 1.7.1 | |
# Customize below to fit your system | |
diff --git a/dwm.h b/dwm.h | |
t@@ -117,6 +117,7 @@ extern void gravitate(Client *c, Bool invert); /* g… | |
extern void killclient(Arg *arg); /* kill c nicely */ | |
extern void manage(Window w, XWindowAttributes *wa); /* manage new clie… | |
extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/ | |
+extern void resizetitle(Client *c); /* resizes c->twin correctl… | |
extern void updatesize(Client *c); /* update the size s… | |
extern void updatetitle(Client *c); /* update the name of c */ | |
extern void unmanage(Client *c); /* destroy c */ | |
diff --git a/event.c b/event.c | |
t@@ -316,6 +316,7 @@ propertynotify(XEvent *e) { | |
} | |
if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { | |
updatetitle(c); | |
+ resizetitle(c); | |
drawtitle(c); | |
} | |
} |