On Tue May 23 14:15:06 2023 +0000, Alexandros Frantzis wrote:
changed this line in [version 5 of the diff](/wine/wine/-/merge_requests/2712/diffs?diff_id=48222&start_sha=a0669e06347fef91e93e0e58019d23906b03afa9#0529b4a040cd83447fe520f50525b3459c88f5d5_128_122)
TL;DR: Changed to `NtUserPostMessage`
This was an intentional change, since this new approach makes the sync method straightforward and seems to me to be more "correct", as it removes any, even transient, disagreement between Wayland output and Wine monitor state in the desktop window process.
From a practical perspective I think both sync and async processing of this message would work OK with the proper care. With async we need to ensure we properly handle any transient output/monitor state disagreement. With sync we need to avoid potential deadlocks between the dispatch thread and the (desktop) window thread.
So, after all that, I think that I now have changed my mind again :) I'd rather deal with the potential of state disagreement (which is somewhat inherent anyway, and which I can manage internally) than deadlocks (however unlikely), so I have switched `NtUserPostMessage`.
Thanks for raising this @rbernon!