aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgthreadedrenderloop.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-07-30 08:22:15 +0200
committerGunnar Sletta <gunnar.sletta@jollamobile.com>2014-07-31 08:44:52 +0200
commit59d5c5cf555a51cd7559cea197a198ef3a792614 (patch)
treea783b764c3651803d904af23558855d46b3fe2f8 /src/quick/scenegraph/qsgthreadedrenderloop.cpp
parent93fe03a1c583b4b090948bf8d4d7e93cb8da4880 (diff)
Avoid eventloop recursion in touch event handling.
The eventloop recursion in the threaded render loop was there to preempt any pending event to make sure we worked with as recent as possible input events. The benefit of this was never verified. The recursion after the actual flush was to fix animations which were constantly started during touch events, such as a behavior tracking the mouse point. This is fixed differently. Event loop recursion is always dangerous, so we're doing what we can to avoid it. Change-Id: I120b2e98350e3b9068153415a671408773fbc769 Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/scenegraph/qsgthreadedrenderloop.cpp')
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index a74a51146e..793a247427 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -1066,17 +1066,9 @@ void QSGThreadedRenderLoop::polishAndSync(Window *w, bool inExpose)
}
// Flush pending touch events.
- // First we force flushing of the windowing system events, so that we're
- // working with the latest possible data. This can trigger event processing
- // which in turn can stop rendering this window, so verify that before
- // proceeding. Then we flush the touch event and as that also does event
- // processing, verify again that we still are active and rendering.
- QWindowSystemInterface::flushWindowSystemEvents();
+ QQuickWindowPrivate::get(window)->flushDelayedTouchEvent();
+ // The delivery of the event might have caused the window to stop rendering
w = windowFor(m_windows, window);
- if (w) {
- QQuickWindowPrivate::get(window)->flushDelayedTouchEvent();
- w = windowFor(m_windows, window);
- }
if (!w || !w->thread || !w->thread->window) {
qCDebug(QSG_LOG_RENDERLOOP) << "- removed after event flushing, abort";
killTimer(w->timerId);