aboutsummaryrefslogtreecommitdiffstats
path: root/xutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'xutil.c')
-rw-r--r--xutil.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xutil.c b/xutil.c
index 91d2cc4..53c191f 100644
--- a/xutil.c
+++ b/xutil.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xutil.c,v 1.49 2012/11/09 03:52:02 okan Exp $
+ * $OpenBSD: xutil.c,v 1.50 2012/12/17 02:28:45 okan Exp $
*/
#include <sys/param.h>
@@ -430,3 +430,12 @@ xu_getcolor(struct screen_ctx *sc, char *name)
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;
+}