mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-25 15:28:19 +02:00
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:
parent
6e5485e0a5
commit
2af660c2fc
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue