I've recently discovered that if an application creates a new background QThread and calls QThread::start() to start the thread's event loop, that thread will sometimes process QMfcApp::winEventFilter, which in turn will cause MFC events to be processed in the background thread. However, this will cause some problems because the MFC events are only meant to be processed in the application's main thread.

Can anyone confirm if it will be ok to do a thread check inside QMfcApp::winEventFilter and only allow it to proceed if the current thread is the main thread? I'm not familiar with the lineage of this class, but the way it's written, I think there was an assumption that it would only get called from the main thread.

Thanks,

Doug