This commit is contained in:
Andrew Gallant (Ocelot)
2012-05-12 21:36:31 -04:00
parent f77feff864
commit 24fef4062a
5 changed files with 29 additions and 7 deletions

View File

@@ -166,8 +166,11 @@ type eventOrError interface{}
// NewID generates a new unused ID for use with requests like CreateWindow.
// If no new ids can be generated, the id returned is 0 and error is non-nil.
// Note that the value returned will need to be converted to the proper
// type. i.e., xproto.Window(id).
// This shouldn't be used directly, and is exported for use in the extension
// sub-packages.
// If you need identifiers, use the appropriate constructor.
// e.g., For a window id, use xproto.NewWindowId. For
// a new pixmap id, use xproto.NewPixmapId. And so on.
func (c *Conn) NewId() (uint32, error) {
xid := <-c.xidChan
if xid.err != nil {