Implement filtering in wxEventLoop::DoYieldFor under wxQT
This commit is contained in:
@@ -131,9 +131,16 @@ void wxQtEventLoopBase::WakeUp()
|
|||||||
|
|
||||||
void wxQtEventLoopBase::DoYieldFor(long eventsToProcess)
|
void wxQtEventLoopBase::DoYieldFor(long eventsToProcess)
|
||||||
{
|
{
|
||||||
while (wxTheApp && wxTheApp->Pending())
|
|
||||||
// TODO: implement event filtering using the eventsToProcess mask
|
QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents;
|
||||||
wxTheApp->Dispatch();
|
|
||||||
|
if ( !(eventsToProcess & wxEVT_CATEGORY_USER_INPUT) )
|
||||||
|
flags |= QEventLoop::ExcludeUserInputEvents;
|
||||||
|
|
||||||
|
if ( !(eventsToProcess & wxEVT_CATEGORY_SOCKET) )
|
||||||
|
flags |= QEventLoop::ExcludeSocketNotifiers;
|
||||||
|
|
||||||
|
m_qtEventLoop->processEvents(flags);
|
||||||
|
|
||||||
wxEventLoopBase::DoYieldFor(eventsToProcess);
|
wxEventLoopBase::DoYieldFor(eventsToProcess);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user