summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoronestone <onestone>2006-12-11 23:30:21 +0000
committeronestone <onestone>2006-12-11 23:30:21 +0000
commitc01320a62cd4a5dfe36840ed2b7af0a1caf4be91 (patch)
tree31d3fc06195f51f9460458f0d3a5e867bd2b98f5
parent5b4c0fb0ca97d13338fd0293e359903acb4a4351 (diff)
downloadaquamarine-c01320a62cd4a5dfe36840ed2b7af0a1caf4be91.tar.gz
aquamarine-c01320a62cd4a5dfe36840ed2b7af0a1caf4be91.tar.bz2
aquamarine: now using client messages to set brightness,opacity and saturation
-rw-r--r--src/utils.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/utils.cpp b/src/utils.cpp
index 2698c9e..b944e15 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -195,9 +195,21 @@ Aquamarine::setWindowProperty (WId id, Atom property, unsigned short value)
value32 = value << 16 | value;
- XChangeProperty (qt_xdisplay (), id, property,
- XA_CARDINAL, 32, PropModeReplace,
- (unsigned char *)&value32, 1);
+ XEvent ev;
+
+ memset (&ev, 0, sizeof (ev));
+ ev.xclient.type = ClientMessage;
+ ev.xclient.window = id;
+ ev.xclient.message_type = property;
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = value32;
+ ev.xclient.data.l[1] = 0;
+ ev.xclient.data.l[2] = 0;
+ ev.xclient.data.l[3] = 0;
+ ev.xclient.data.l[4] = 0;
+
+ XSendEvent (qt_xdisplay (), qt_xrootwin(), False,
+ SubstructureRedirectMask | SubstructureNotifyMask, &ev);
}