From 2af660c2fcd15c86c66459bfc074c190ea1462e6 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Mon, 29 Oct 2007 10:46:20 -0700 Subject: [PATCH] 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. --- src/xcb_io.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xcb_io.c b/src/xcb_io.c index 193ee686..5f071849 100644 --- a/src/xcb_io.c +++ b/src/xcb_io.c @@ -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; }