aboutsummaryrefslogtreecommitdiff
path: root/nexgb/screensaver/screensaver.go
diff options
context:
space:
mode:
authoraarzilli <alessandro.arzilli@gmail.com>2017-01-18 10:52:16 +0100
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:27 +0200
commit3906399e7c2a40fbaf355de572cf50a314083f64 (patch)
treefcdcca7da60cc3c7c7e87faa5dcc4898d1671514 /nexgb/screensaver/screensaver.go
parent1c01d79ba14a802c603ca2e5bbd35156e3363b85 (diff)
downloadhaven-3906399e7c2a40fbaf355de572cf50a314083f64.tar.gz
haven-3906399e7c2a40fbaf355de572cf50a314083f64.tar.xz
haven-3906399e7c2a40fbaf355de572cf50a314083f64.zip
Regenerated from xcb-proto 1.12
Diffstat (limited to 'nexgb/screensaver/screensaver.go')
-rw-r--r--nexgb/screensaver/screensaver.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/nexgb/screensaver/screensaver.go b/nexgb/screensaver/screensaver.go
index 418576c..0e9511f 100644
--- a/nexgb/screensaver/screensaver.go
+++ b/nexgb/screensaver/screensaver.go
@@ -513,7 +513,7 @@ func (cook SetAttributesCookie) Check() error {
// Write request to wire for SetAttributes
// setAttributesRequest writes a SetAttributes request to a byte slice.
func setAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) []byte {
- size := xgb.Pad((24 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+ size := xgb.Pad((28 + xgb.Pad((4 * xgb.PopCount(int(ValueMask))))))
b := 0
buf := make([]byte, size)
@@ -557,6 +557,7 @@ func setAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int1
xgb.Put32(buf[b:], ValueMask)
b += 4
+
for i := 0; i < xgb.PopCount(int(ValueMask)); i++ {
xgb.Put32(buf[b:], ValueList[i])
b += 4