There's a problem in the current message queue code, which shows up in
games (and probably some installers too?)... it doesn't accept mouse input
before the user has hit a key at least once.

I've tracked it down to the message queue code, this condition:

warn:msg:QUEUE_WakeSomeone couldn't find queue

and this happens because QUEUE_WakeSomeone looks through all queues to
find a queue with an appropriate wake mask, then sets its wake bits to
wake it up. But the application is in a PeekMessage loop, so it never
waits, and so no wake masks are set, so QUEUE_WakeSomeone can't do
anything. Furthermore, PeekMessage only retrieves hardware events if the
queue's wake bits are set, and since QUEUE_WakeSomeone didn't set any
queue's wake bits, nothing happens. All mouse events just get queued but
never read out before something else happens... (like the user hitting a
key instead, but I don't know why keypresses don't also get stuck, or why
mouse events work afterwards.)

Anyway, how to solve?

(This code has "Alexandre" written all over it (ok, at least the copyright
lines), so maybe he's the best to answer...)

Reply via email to