aewl
diff client.c @ 43:989178822938
changed default colors
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Thu, 13 Jul 2006 11:43:05 +0200 |
parents | cd30cce52b78 |
children | a36f95a4841a |
line diff
1.1 --- a/client.c Thu Jul 13 10:34:55 2006 +0200 1.2 +++ b/client.c Thu Jul 13 11:43:05 2006 +0200 1.3 @@ -9,7 +9,7 @@ 1.4 #include <X11/Xatom.h> 1.5 #include <X11/Xutil.h> 1.6 1.7 -#include "wm.h" 1.8 +#include "dwm.h" 1.9 1.10 static void floating(void); 1.11 static void tiling(void); 1.12 @@ -125,8 +125,8 @@ 1.13 c->tw = 0; 1.14 for(i = 0; i < TLast; i++) 1.15 if(c->tags[i]) 1.16 - c->tw += textw(&dc.font, c->tags[i]) + dc.font.height; 1.17 - c->tw += textw(&dc.font, c->name) + dc.font.height; 1.18 + c->tw += textw(c->tags[i]) + dc.font.height; 1.19 + c->tw += textw(c->name) + dc.font.height; 1.20 if(c->tw > c->w) 1.21 c->tw = c->w + 2; 1.22 c->tx = c->x + c->w - c->tw + 2; 1.23 @@ -226,10 +226,12 @@ 1.24 c->snext = stack; 1.25 stack = c; 1.26 if(old && old != c) { 1.27 + XSetWindowBorder(dpy, old->win, dc.bg); 1.28 XMapWindow(dpy, old->title); 1.29 draw_client(old); 1.30 } 1.31 XUnmapWindow(dpy, c->title); 1.32 + XSetWindowBorder(dpy, c->win, dc.fg); 1.33 draw_client(c); 1.34 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); 1.35 XFlush(dpy); 1.36 @@ -250,8 +252,6 @@ 1.37 c->th = th; 1.38 c->border = 1; 1.39 update_size(c); 1.40 - XSetWindowBorderWidth(dpy, c->win, 1); 1.41 - XSetWindowBorder(dpy, c->win, dc.border); 1.42 XSelectInput(dpy, c->win, 1.43 StructureNotifyMask | PropertyChangeMask | EnterWindowMask); 1.44 XGetTransientForHint(dpy, c->win, &c->trans); 1.45 @@ -269,6 +269,7 @@ 1.46 for(l=&clients; *l; l=&(*l)->next); 1.47 c->next = *l; /* *l == nil */ 1.48 *l = c; 1.49 + XSetWindowBorderWidth(dpy, c->win, 1); 1.50 XMapRaised(dpy, c->win); 1.51 XMapRaised(dpy, c->title); 1.52 XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask, 1.53 @@ -435,12 +436,12 @@ 1.54 for(i = 0; i < TLast; i++) { 1.55 if(c->tags[i]) { 1.56 dc.x += dc.w; 1.57 - dc.w = textw(&dc.font, c->tags[i]) + dc.font.height; 1.58 + dc.w = textw(c->tags[i]) + dc.font.height; 1.59 draw(True, c->tags[i]); 1.60 } 1.61 } 1.62 dc.x += dc.w; 1.63 - dc.w = textw(&dc.font, c->name) + dc.font.height; 1.64 + dc.w = textw(c->name) + dc.font.height; 1.65 draw(True, c->name); 1.66 XCopyArea(dpy, dc.drawable, c->title, dc.gc, 1.67 0, 0, c->tw, c->th, 0, 0);