eglfs: Avoid unexpectedly flushing QPA input events

Flushing all events to ensure that the expose (or other queued events) get
processed right away is dangerous. Instead, pass ExcludeUserInputEvents like
many other platform plugins do. This way queued input events do not get
processed at an unexpected point in time and so do not interfere with modal
dialogs for instance.

Task-number: QTBUG-57229
Change-Id: I9da09e62627d26485fb5a37fc190cb4a4bcb28b6
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2016-11-21 12:46:46 +01:00 committed by Andy Nichols
parent a9af3c8502
commit cff48c7845
2 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ QPlatformBackingStore *QEglFSIntegration::createPlatformBackingStore(QWindow *wi
QPlatformWindow *QEglFSIntegration::createPlatformWindow(QWindow *window) const
{
QWindowSystemInterface::flushWindowSystemEvents();
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
QEglFSWindow *w = qt_egl_device_integration()->createWindow(window);
w->create();
if (window->type() != Qt::ToolTip)

View File

@ -208,7 +208,7 @@ void QEglFSWindow::setVisible(bool visible)
QWindowSystemInterface::handleExposeEvent(wnd, QRect(QPoint(0, 0), wnd->geometry().size()));
if (visible)
QWindowSystemInterface::flushWindowSystemEvents();
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
}
void QEglFSWindow::setGeometry(const QRect &r)