flush_events()
From which thread?
1. From main thread: useless unless we're pumping messages 2. From dialog thread: it's already pumping messages
Then you can remove active_page_changed and WaitForSingleObject(hotkey_dialog_idle).
Good idea. We should use SendMessageTimeout() specifically, to:
1. Wait until the WndProc has (1) received the message, (2) processed the messave, *and* (3) returned the LRESULT. (@DarkShadow44: you used PostMessage, which doesn't wait for the WndProc to receive it. This is why I said you should *send* the message, not post it.) 2. We want to preserve the timeout. Otherwise winetest runs might get stuck.