aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-13 11:43:05 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-13 11:43:05 +0200
commit9e8b3258a06de01c53e60243ffe3419b47d016dd (patch)
treea39ebed6cc97e75dc71f7ffb54ebb66342fef48d /client.c
parent44f2e8b952264311887c3b51dc6a987af226062a (diff)
downloaddwm-9e8b3258a06de01c53e60243ffe3419b47d016dd.tar.gz
changed default colors
Diffstat (limited to 'client.c')
-rw-r--r--client.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/client.c b/client.c
index 679e2be..932b23e 100644
--- a/client.c
+++ b/client.c
@@ -9,7 +9,7 @@
#include <X11/Xatom.h>
#include <X11/Xutil.h>
-#include "wm.h"
+#include "dwm.h"
static void floating(void);
static void tiling(void);
@@ -125,8 +125,8 @@ resize_title(Client *c)
c->tw = 0;
for(i = 0; i < TLast; i++)
if(c->tags[i])
- c->tw += textw(&dc.font, c->tags[i]) + dc.font.height;
- c->tw += textw(&dc.font, c->name) + dc.font.height;
+ c->tw += textw(c->tags[i]) + dc.font.height;
+ c->tw += textw(c->name) + dc.font.height;
if(c->tw > c->w)
c->tw = c->w + 2;
c->tx = c->x + c->w - c->tw + 2;
@@ -226,10 +226,12 @@ focus(Client *c)
c->snext = stack;
stack = c;
if(old && old != c) {
+ XSetWindowBorder(dpy, old->win, dc.bg);
XMapWindow(dpy, old->title);
draw_client(old);
}
XUnmapWindow(dpy, c->title);
+ XSetWindowBorder(dpy, c->win, dc.fg);
draw_client(c);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
XFlush(dpy);
@@ -250,8 +252,6 @@ manage(Window w, XWindowAttributes *wa)
c->th = th;
c->border = 1;
update_size(c);
- XSetWindowBorderWidth(dpy, c->win, 1);
- XSetWindowBorder(dpy, c->win, dc.border);
XSelectInput(dpy, c->win,
StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
XGetTransientForHint(dpy, c->win, &c->trans);
@@ -269,6 +269,7 @@ manage(Window w, XWindowAttributes *wa)
for(l=&clients; *l; l=&(*l)->next);
c->next = *l; /* *l == nil */
*l = c;
+ XSetWindowBorderWidth(dpy, c->win, 1);
XMapRaised(dpy, c->win);
XMapRaised(dpy, c->title);
XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
@@ -435,12 +436,12 @@ draw_client(Client *c)
for(i = 0; i < TLast; i++) {
if(c->tags[i]) {
dc.x += dc.w;
- dc.w = textw(&dc.font, c->tags[i]) + dc.font.height;
+ dc.w = textw(c->tags[i]) + dc.font.height;
draw(True, c->tags[i]);
}
}
dc.x += dc.w;
- dc.w = textw(&dc.font, c->name) + dc.font.height;
+ dc.w = textw(c->name) + dc.font.height;
draw(True, c->name);
XCopyArea(dpy, dc.drawable, c->title, dc.gc,
0, 0, c->tw, c->th, 0, 0);