aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xfixes
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/xfixes
parent1c01d79ba14a802c603ca2e5bbd35156e3363b85 (diff)
downloadhaven-3906399e7c2a40fbaf355de572cf50a314083f64.tar.gz
haven-3906399e7c2a40fbaf355de572cf50a314083f64.tar.xz
haven-3906399e7c2a40fbaf355de572cf50a314083f64.zip
Regenerated from xcb-proto 1.12
Diffstat (limited to 'nexgb/xfixes')
-rw-r--r--nexgb/xfixes/xfixes.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/nexgb/xfixes/xfixes.go b/nexgb/xfixes/xfixes.go
index 0f9e4b0..440c3fd 100644
--- a/nexgb/xfixes/xfixes.go
+++ b/nexgb/xfixes/xfixes.go
@@ -1524,9 +1524,8 @@ type GetCursorImageAndNameReply struct {
CursorAtom xproto.Atom
Nbytes uint16
// padding: 2 bytes
- Name string // size: xgb.Pad((int(Nbytes) * 1))
- // alignment gap to multiple of 4
CursorImage []uint32 // size: xgb.Pad(((int(Width) * int(Height)) * 4))
+ Name string // size: xgb.Pad((int(Nbytes) * 1))
}
// Reply blocks and returns the reply data for a GetCursorImageAndName request.
@@ -1583,6 +1582,12 @@ func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply {
b += 2 // padding
+ v.CursorImage = make([]uint32, (int(v.Width) * int(v.Height)))
+ for i := 0; i < int((int(v.Width) * int(v.Height))); i++ {
+ v.CursorImage[i] = xgb.Get32(buf[b:])
+ b += 4
+ }
+
{
byteString := make([]byte, v.Nbytes)
copy(byteString[:v.Nbytes], buf[b:])
@@ -1590,14 +1595,6 @@ func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply {
b += int(v.Nbytes)
}
- b = (b + 3) & ^3 // alignment gap
-
- v.CursorImage = make([]uint32, (int(v.Width) * int(v.Height)))
- for i := 0; i < int((int(v.Width) * int(v.Height))); i++ {
- v.CursorImage[i] = xgb.Get32(buf[b:])
- b += 4
- }
-
return v
}