Code: Select all
void WindowEventUtilities::messagePump()
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
// Windows Message Loop (NULL means check all HWNDs belonging to this context)
MSG msg;
while( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
.....
.....
1 - Definition of messagePump says that it processes messages of REGISTERED WINDOWS (here registered means the ones created by OGRE, not the external handles)
2 - LINUX and MAC specific code correctly checks ONLY REGISTERED WINDOWS (well am not a linux/mac expert, thats as far as i can understand)
3 - As you see above, windows specific code PEEKS ALL WINDOW MESSAGES, containing UNREGISTERED WINDOWS (externals)
So, if i have a custom window and an ogre window, calling messagepump to process OGRE Window's messages screws my custom windows message processing. To make it more clear, if you have an external window running in lets say Qt, and another preview window created by OGRE, the window created by ogre becomes unresponsive if you dont call WindowEventUtilities::messagePump(), but if you do, then your Qt window can no longer process its own messages.
It would be great if someone fixed the code to only process messages of registered windows.