Two threads can request sequence sync and XID fetch simultaneously.

So don't assert that they can't.

This makes the Xlib/XCB implementation of _XAllocID more closely
resemble the traditional Xlib version.
This commit is contained in:
Jamey Sharp 2007-10-29 10:46:20 -07:00
parent 6e5485e0a5
commit 2af660c2fc

View file

@ -282,9 +282,11 @@ XID _XAllocID(Display *dpy)
XID ret = dpy->xcb->next_xid;
dpy->xcb->next_xid = 0;
assert(!(dpy->flags & XlibDisplayPrivSync));
dpy->savedsynchandler = dpy->synchandler;
dpy->flags |= XlibDisplayPrivSync;
if(!(dpy->flags & XlibDisplayPrivSync))
{
dpy->savedsynchandler = dpy->synchandler;
dpy->flags |= XlibDisplayPrivSync;
}
dpy->synchandler = _XIDHandler;
return ret;
}