summaryrefslogtreecommitdiffstats
path: root/compton.h
diff options
context:
space:
mode:
authorRichard Grenville <[email protected]>2013-10-01 23:20:22 +0800
committerRichard Grenville <[email protected]>2013-10-01 23:20:22 +0800
commit70dfd1f58e94ae63eb8d035a35c4002dcd5cc14a (patch)
treeccff40216e0ae736a45adca84b47c95f99cbdeea /compton.h
parent7f97d55da55d44a018de2fb065ec3d4f63ab0307 (diff)
downloadtdebase-70dfd1f58e94ae63eb8d035a35c4002dcd5cc14a.tar.gz
tdebase-70dfd1f58e94ae63eb8d035a35c4002dcd5cc14a.zip
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.
Diffstat (limited to 'compton.h')
-rw-r--r--compton.h5
1 files changed, 3 insertions, 2 deletions
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