summaryrefslogtreecommitdiff
path: root/nls
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2022-08-05 15:19:08 -0400
committerAdam Jackson <ajax@nwnk.net>2022-11-02 14:05:38 +0000
commit79775575418fd6f8ee1c5e5bbe403df4606fb5b6 (patch)
tree9b8a09d27db72afacba7a5f5b6fd9d34da64d625 /nls
parent0d1d65bdd98966f52bcac4077f94827b20b229dd (diff)
Allow X*IfEvent() to reenter libX11
The documentation for this family of functions very clearly says not to call into xlib in your predicate function, but historically single threaded apps could get away with it just fine, and now that we've forced thread-safety on the world such apps will now deadlock instead. That's not an acceptable regression even if the app is technically broken. This has been reported with XFCE and FVWM, and Motif's cut-and-paste code has the same bug by inspection, so this does need to be addressed. This change nerfs LockDisplay/UnlockDisplay while inside the critical bit of an IfEvent function. This is still safe in the sense that the display remains locked and no other thread should be able to change it from under us, but the loop that scans the event queue might not be robust against it being modified as a side effect of protocol emitted by the predicate callback. But that's not new, non-XInitThreads'd xlib would have the same caveat. Closes: xorg/lib/libx11#157
Diffstat (limited to 'nls')
0 files changed, 0 insertions, 0 deletions