about summary refs log tree commit diff
path: root/xutil.c
diff options
context:
space:
mode:
authorokan <okan>2012-12-19 15:21:34 +0000
committerokan <okan>2012-12-19 15:21:34 +0000
commitf77166194f4586cb19abcb7951ca05e356ac74e1 (patch)
tree304227f75a0b05af3f544be74a6ce47b3fae676e /xutil.c
parent878eb6bf050c6b55104e12c17b9644c2625bace0 (diff)
parentdc1e3a88438dc732349154bca610dbe813d2fc04 (diff)
downloadcwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.gz
cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.xz
cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.zip
cvsimport
Diffstat (limited to 'xutil.c')
-rw-r--r--xutil.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/xutil.c b/xutil.c
index fa3fc7f..d141766 100644
--- a/xutil.c
+++ b/xutil.c
@@ -422,11 +422,19 @@ xu_getcolor(struct screen_ctx *sc, char *name)
 {
 	XColor	 color, tmp;
 
-	if (!XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, sc->which),
-	    name, &color, &tmp)) {
+	if (!XAllocNamedColor(X_Dpy, sc->colormap, name, &color, &tmp)) {
 		warnx("XAllocNamedColor error: '%s'", name);
 		return (0);
 	}
 
 	return (color.pixel);
 }
+
+void
+xu_xorcolor(XRenderColor a, XRenderColor b, XRenderColor *r)
+{
+	r->red = a.red ^ b.red;
+	r->green = a.green ^ b.green;
+	r->blue = a.blue ^ b.blue;
+	r->alpha = 0xffff;
+}