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 <laszlo.p.agocs@nokia.com>
This commit is contained in:
Jon Trulson 2012-02-29 16:06:56 -07:00 committed by Qt by Nokia
parent bbc97c38d5
commit c3b72e9c2f

View File

@ -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();