From 70dfd1f58e94ae63eb8d035a35c4002dcd5cc14a Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Tue, 1 Oct 2013 23:20:22 +0800 Subject: Bug fix #149: --opacity-rule misbehaves on 32-bit systems & others - Fix a bug that --opacity-rule misbehaves with a value higher than 50% on 32-bit systems. Thanks to mrinx for reporting. (#149) - Fix a bug that opacity-rule in configuration file does not work. --- compton.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compton.h') diff --git a/compton.h b/compton.h index 11325b75c..cb16111a8 100644 --- a/compton.h +++ b/compton.h @@ -476,9 +476,10 @@ win_has_frame(const win *w) { } static inline void -wid_set_opacity_prop(session_t *ps, Window wid, long val) { +wid_set_opacity_prop(session_t *ps, Window wid, opacity_t val) { + const unsigned long v = val; XChangeProperty(ps->dpy, wid, ps->atom_opacity, XA_CARDINAL, 32, - PropModeReplace, (unsigned char *) &val, 1); + PropModeReplace, (unsigned char *) &v, 1); } static inline void -- cgit v1.2.3