Instead of https://gitlab.winehq.org/wine/wine/-/merge_requests/8869
I think this would be a much lighter and less complicated approach than trying to wake the window threads with internal messages. And it should be able to avoid spurious wake ups when there's no window surfaces involved.
What I'm not completely sure about is whether this is going to flush the surfaces frequently enough, and if we can assume the window thread will always either peek or wait for messages.
-- v2: win32u: Keep window surfaces in a per-thread linked list. win32u: Remove window surface flush in expose_window_surface. win32u: Remove window surface flush on lock / unlock. win32u: Remove some less useful flush_window_surfaces. win32u: Flush window surfaces while waiting for messages. win32u: Use an absolute wait timeout in wait_message. win32u: Remove unnecessary window_surface exports. win32u: Dispatch NtUserUpdateLayeredWindow to the owner thread.