-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12
-
None
The current logic is:
while (QWindowSystemInterfacePrivate::windowSystemEventsQueued()) { QWindowSystemInterfacePrivate::WindowSystemEvent *event = (flags & QEventLoop::ExcludeUserInputEvents) ? QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() : QWindowSystemInterfacePrivate::getWindowSystemEvent(); if (!event) break; }
where
QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent()
{
return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull();
}
WindowSystemEvent *takeFirstNonUserInputOrReturnNull()
{
const QMutexLocker locker(&mutex);
for (int i = 0; i < impl.size(); ++i)
if (!(impl.at(i)->type & QWindowSystemInterfacePrivate::UserInputEvent))
return impl.takeAt(i);
return 0;
}
Every time we search from the beginning for non-UserInputEvents. This can be optimized by caching the index.
- relates to
-
QTBUG-70095 QWindowSystemInterface synchronous mode
-
- Reported
-