From d800a62b878fa152c94253b2c0f60ef4f5b9b9d1 Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Tue, 21 May 2013 09:18:41 +0800 Subject: Feature #113: Set opacity based on conditions - Add --opacity-rule, which sets opacity based on conditions, as requested by zabbal. (#113) - Add a data field for each condition. - Correct the FAQ link in README.md. Silly me. - Code clean-up. --- compton.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'compton.h') diff --git a/compton.h b/compton.h index b3695af29..334e7372a 100644 --- a/compton.h +++ b/compton.h @@ -415,6 +415,17 @@ win_has_frame(const win *w) { || w->top_width || w->left_width || w->right_width || w->bottom_width; } +static inline void +wid_set_opacity_prop(session_t *ps, Window wid, long val) { + XChangeProperty(ps->dpy, wid, ps->atom_opacity, XA_CARDINAL, 32, + PropModeReplace, (unsigned char *) &val, 1); +} + +static inline void +wid_rm_opacity_prop(session_t *ps, Window wid) { + XDeleteProperty(ps->dpy, wid, ps->atom_opacity); +} + /** * Dump an drawable's info. */ -- cgit v1.2.1