From 3906399e7c2a40fbaf355de572cf50a314083f64 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Wed, 18 Jan 2017 10:52:16 +0100 Subject: Regenerated from xcb-proto 1.12 --- nexgb/xfixes/xfixes.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'nexgb/xfixes') 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 } -- cgit v1.2.3