diff options
author | okan <okan> | 2012-12-19 15:21:34 +0000 |
---|---|---|
committer | okan <okan> | 2012-12-19 15:21:34 +0000 |
commit | f77166194f4586cb19abcb7951ca05e356ac74e1 (patch) | |
tree | 304227f75a0b05af3f544be74a6ce47b3fae676e /xutil.c | |
parent | 878eb6bf050c6b55104e12c17b9644c2625bace0 (diff) | |
parent | dc1e3a88438dc732349154bca610dbe813d2fc04 (diff) | |
download | cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.gz cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.xz cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.zip |
cvsimport
Diffstat (limited to 'xutil.c')
-rw-r--r-- | xutil.c | 12 |
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; +} |