summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorokan <okan>2009-05-17 23:40:57 +0000
committerokan <okan>2009-05-17 23:40:57 +0000
commit4d5dc5d9ea24d1b856c8b8c13c36a16daa396a4d (patch)
tree1981b9b6d512a7bfdf07dbe8c7e957de0e004d61 /client.c
parent5d51c8e0e541449093913ff3b1f78989c82ed035 (diff)
downloadcwm-4d5dc5d9ea24d1b856c8b8c13c36a16daa396a4d.tar.gz
cwm-4d5dc5d9ea24d1b856c8b8c13c36a16daa396a4d.tar.xz
cwm-4d5dc5d9ea24d1b856c8b8c13c36a16daa396a4d.zip
a long time coming - re-work the way we deal with colors: since we're
using Xft(3), use it to select the font color as well instead of trying
to build one; properly allocate and free colors at-will, e.g. we now
have configurable colors.

feedback and ok's todd@ and oga@
Diffstat (limited to 'client.c')
-rw-r--r--client.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/client.c b/client.c
index e1e0dbe..be4e379 100644
--- a/client.c
+++ b/client.c
@@ -403,25 +403,25 @@ void
 client_draw_border(struct client_ctx *cc)
 {
 	struct screen_ctx	*sc = CCTOSC(cc);
-	u_long			 pixl;
+	unsigned long		 pixel;
 
 	if (cc->active)
 		switch (cc->highlight) {
-		case CLIENT_HIGHLIGHT_BLUE:
-			pixl = sc->bluepixl;
+		case CLIENT_HIGHLIGHT_GROUP:
+			pixel = sc->color[CWM_COLOR_BORDER_GROUP].pixel;
 			break;
-		case CLIENT_HIGHLIGHT_RED:
-			pixl = sc->redpixl;
+		case CLIENT_HIGHLIGHT_UNGROUP:
+			pixel = sc->color[CWM_COLOR_BORDER_UNGROUP].pixel;
 			break;
 		default:
-			pixl = sc->whitepixl;
+			pixel = sc->color[CWM_COLOR_BORDOR_ACTIVE].pixel;
 			break;
 		}
 	else
-		pixl = sc->graypixl;
+		pixel = sc->color[CWM_COLOR_BORDER_INACTIVE].pixel;
 
 	XSetWindowBorderWidth(X_Dpy, cc->win, cc->bwidth);
-	XSetWindowBorder(X_Dpy, cc->win, pixl);
+	XSetWindowBorder(X_Dpy, cc->win, pixel);
 }
 
 void