On Thu, 2012-06-21 at 13:08 +0100, Myrosia Dzikovska wrote: > TASKTYPE TASKMOD XEventThread(void *data) > { > XEvent xev; > HEventRec r; > HWin win; > HThread t; > do{ > XNextEvent(globDisp, &xev); > r=convertXevToHEventRec(xev); > if(r.event != HIGNORE) { > win=FindWindowRec(xev.xany.window); > t=win->theThread; > postEventToQueue(t, r); > } > HFlush(); > } > while(True); > } > > Basically, it's taking up X events and re-posting them into queues > handled by the apps with the convertXevToHEventRec and > postEventToQueue calls. > > If I disable the creation of that thread, nothing freezes anymore, but > the apps that depend on the library start misbehaving (e.g., windows > not reacting properly to close events). > > I tried adding XLockDisplay/XUnlockDisplay around the calls to > XNextEvent, but that does not work because it blocks waiting for > events and the display is permanently locked.
Do you mean you halt in XLockDisplay, or in XNextEvent? If the former, then xlib is probably already locked by another thread. If the latter, then perhaps you didn't call XInitThreads, or didn't call it early enough. Alternatively, the OSes you're comparing may not have identical versions of libX11 and libxcb, and the failing one is missing a thread-safety fix. - ajax
signature.asc
Description: This is a digitally signed message part
_______________________________________________ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com