diff options
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmeventdispatcher.cpp')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmeventdispatcher.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp index 2e1b083557..1902f8a4a7 100644 --- a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp +++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp @@ -30,6 +30,7 @@ #include "qwasmeventdispatcher.h" #include <QtCore/qcoreapplication.h> +#include <QtGui/qpa/qwindowsysteminterface.h> #include <emscripten.h> @@ -144,7 +145,8 @@ void QWasmEventDispatcher::doMaintainTimers() // native timer. // Schedule a zero-timer to continue processing any pending events. - if (!m_hasZeroTimer && hasPendingEvents()) { + extern uint qGlobalPostedEventsCount(); // from qapplication.cpp + if (!m_hasZeroTimer && (qGlobalPostedEventsCount() || QWindowSystemInterface::windowSystemEventsQueued())) { auto callback = [](void *eventDispatcher) { QWasmEventDispatcher *that = static_cast<QWasmEventDispatcher *>(eventDispatcher); that->m_hasZeroTimer = false; |