Potentially noob question: is there any particular reason why is QS_ALLEVENT used?
I was trying to use vibe.d with WebView2. Basically following Win32 examples of WebView2 but using vibe's runApplication instead of manual loop with GetMessage, TranslateMessage, DispatchMessage. It works in general but with a weird thing: webview does not respond to mouse input until I, for example, move mouse to window border - at that moment all previous input is processed and become visible (like text selection). It seems that event loop sits in MsgWaitForMultipleObjectsEx and is not notified about activity in webview when in fact it's already waiting in queue. That's related to webview threading model and usage of message queue, I guess?..
Quick test with SetTimer from winapi makes window responsive - event loop frequently receives timer event and with that also processes that input with PeekMessage. But it's an ugly workaround.
A bit deeper research shows that using QS_ALLINPUT instead of QS_ALLEVENT also fixes the issue - according to docs, the difference is additional QS_SENDMESSAGE only.
QS_ALLINPUT sounds like the right call. I'm not sure why it is QS_ALLEVENT instead, probably it was just an oversight and nobody has noticed it so far.
Potentially noob question: is there any particular reason why is
QS_ALLEVENT
used?I was trying to use vibe.d with WebView2. Basically following Win32 examples of WebView2 but using vibe's
runApplication
instead of manual loop withGetMessage
,TranslateMessage
,DispatchMessage
. It works in general but with a weird thing: webview does not respond to mouse input until I, for example, move mouse to window border - at that moment all previous input is processed and become visible (like text selection). It seems that event loop sits inMsgWaitForMultipleObjectsEx
and is not notified about activity in webview when in fact it's already waiting in queue. That's related to webview threading model and usage of message queue, I guess?..Quick test with
SetTimer
from winapi makes window responsive - event loop frequently receives timer event and with that also processes that input withPeekMessage
. But it's an ugly workaround.A bit deeper research shows that using
QS_ALLINPUT
instead ofQS_ALLEVENT
also fixes the issue - according to docs, the difference is additionalQS_SENDMESSAGE
only.