BurntSushi / xgb

The X Go Binding is a low-level API to communicate with the X server. It is modeled on XCB and supports many X extensions.
Other
489 stars 75 forks source link

xproto.SendEvent's Event argument is a string #8

Closed viking closed 11 years ago

viking commented 11 years ago

Is this intended? As it is, I have to do this: string(event.Bytes()) to use the function.

BurntSushi commented 11 years ago

Unfortunately yes. Here is the relevant XML of the protocol:

<request name="SendEvent" opcode="25">
    <field type="BOOL" name="propagate" />
    <field type="WINDOW" name="destination" altenum="SendEventDest" />
    <field type="CARD32" name="event_mask" mask="EventMask" />
    <list type="char" name="event"><value>32</value></list>
</request>

The list has an element type of char, which makes it a string. I'm not sure why this is, and it would probably be more appropriate as a CARD8. But this is an upstream issue. Maybe you can post to the XCB mailing list?

Since this is an upstream issue, it's a wontfix.