On Tue Jul 9 11:52:46 2024 +0000, Alexandros Frantzis wrote:
IIRC, the reason the post was inside the lock was to ensure that the target HWND hadn't been reassigned if the window/surface was destroyed by the (different) window thread. At some point in the various MR discussions we established that this is not something we need to worry about in general, so moving it out of the lock looks fine. I am curious, though, under which circumstances posting that message leads to a deadlock?
It's probably a regression from some of my window surface locking changes, but it now deadlocks when window surface flush tries to acquire the wayland surface lock, and a resize event at the same time tries to post a message to that window (which requires the "user" global lock) while holding the wayland surface lock itself.