summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-11-21 12:46:46 +0100
committerAndy Nichols <andy.nichols@qt.io>2016-11-22 12:25:37 +0000
commitcff48c7845ccf51ac53a550a43dec78428124f70 (patch)
tree440a44ff4abcf6b37ad0f1863078bb24b036ef83
parenta9af3c85022994cfe18a05cd92db9fc0b0ad902c (diff)
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>
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp2
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
index bb62506f33..2a6f3aa7cf 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
@@ -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)
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index 84856831c3..3cc7079fbb 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -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)