Implement filtering in wxEventLoop::DoYieldFor under wxQT

This commit is contained in:
Graham Dawes
2019-01-23 11:55:56 +00:00
parent 5d40d57218
commit b8f71efc04

View File

@@ -131,10 +131,17 @@ void wxQtEventLoopBase::WakeUp()
void wxQtEventLoopBase::DoYieldFor(long eventsToProcess)
{
while (wxTheApp && wxTheApp->Pending())
// TODO: implement event filtering using the eventsToProcess mask
wxTheApp->Dispatch();
QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents;
if ( !(eventsToProcess & wxEVT_CATEGORY_USER_INPUT) )
flags |= QEventLoop::ExcludeUserInputEvents;
if ( !(eventsToProcess & wxEVT_CATEGORY_SOCKET) )
flags |= QEventLoop::ExcludeSocketNotifiers;
m_qtEventLoop->processEvents(flags);
wxEventLoopBase::DoYieldFor(eventsToProcess);
}