From e57b49f346f8bd42ff96559ba2e8355465254a34 Mon Sep 17 00:00:00 2001 From: Mikolaj Boc Date: Mon, 5 Sep 2022 15:55:10 +0200 Subject: [PATCH] Clear the timer target time when stopping a timer on WASM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not clearing the target time makes the subsequently created timers not get their time ticks, as no actual timeout will be registered as the dispatcher wrongly assumes there will be a tick fired, which there isn't. Since there are no updates, the WASM compositor enters an infinite window update loop where it requests an update on a window, and the window requests an update on it, getting the update request back due to an animation running forever. Fixes: QTBUG-105347 Fixes: QTBUG-102004 Fixes: QTBUG-104518 Fixes: QTBUG-106153 Change-Id: I14b8dd08df81852e28e8527545c8530e0656990d Reviewed-by: Morten Johan Sørvig (cherry picked from commit df4be707407685d9afdeacaca172c01dd74c07a8) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qeventdispatcher_wasm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/kernel/qeventdispatcher_wasm.cpp b/src/corelib/kernel/qeventdispatcher_wasm.cpp index 7ae29e616d7..73f468aae54 100644 --- a/src/corelib/kernel/qeventdispatcher_wasm.cpp +++ b/src/corelib/kernel/qeventdispatcher_wasm.cpp @@ -495,6 +495,7 @@ void QEventDispatcherWasm::updateNativeTimer() if (m_timerId > 0) { emscripten_clear_timeout(m_timerId); m_timerId = 0; + m_timerTargetTime = 0; } return; }