From c3b72e9c2f6b35b33e8564aaa96291901a02ecee Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Wed, 29 Feb 2012 16:06:56 -0700 Subject: [PATCH] Start eventTime timer so that the .elapsed method will work. QWindowSystemInterfacePrivate::eventTime.start() is never called, resulting in all calls to QWindowSystemInterfacePrivate::eventTime.elapsed() within qwindowsysteminterface_qpa.cpp to return 0. This could cause events to be lost, such as mouse button press events from the evdevmouse input plugin. Change-Id: Iba9d23b51af80e8532d24ccf382e9077c06bb4be Reviewed-by: Laszlo Agocs --- src/gui/kernel/qwindowsysteminterface_qpa.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp index 5b77d97950..6f0abbdd0c 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp +++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp @@ -266,6 +266,10 @@ void QWindowSystemInterfacePrivate::queueWindowSystemEvent(QWindowSystemInterfac windowSystemEventQueue.append(ev); queueMutex.unlock(); + // Make sure the event timer is started. + if (!QWindowSystemInterfacePrivate::eventTime.isValid()) + QWindowSystemInterfacePrivate::eventTime.start(); + QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::qt_qpa_core_dispatcher(); if (dispatcher) dispatcher->wakeUp();