Callbacks while app is looping

Ove Kaaven ovek at arcticnet.no
Sun May 4 23:43:25 CDT 2003


fre, 02.05.2003 kl. 21.03 skrev Mike Hearn:
> > Well, the wine DInput implentation keeps an internal map of key states and 
> > updates these when an event happens.  Its just this badly written bit of code 
> > thats using it to wait for a keyboard event :)
> 
> I suspect the actual problem is that keyboard hooks require the app to
> be processing messages in order to function. In fact, run that test app
> in desktop mode - you'll see that it works fine, presumably because the
> desktop continues processing messages even when the app within it is
> not.
> 
> I'm not sure what to do about this, it'd seem sensible to have X11
> events processed by the service thread, but I suspect there are reasons
> why this isn't the case.

Even so, the current thread can and should still process its incoming
X11 events whenever it needs to. Adding an event-checking (but otherwise
no-op) construct like MsgWaitForMultipleObjectsEx(0, NULL, 0, 0, 0); to
GetDeviceState and GetDeviceData should be able to make this happen.





More information about the wine-devel mailing list