summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_glib_p.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-12-17 10:20:46 +0100
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-12-17 10:20:46 +0100
commitbc01bb10da23d0d2308cf02a16947be836bc9a21 (patch)
treed57fe1ac55f21cf5c426e31659d2aca5c895f363 /src/corelib/kernel/qeventdispatcher_glib_p.h
parent11ec7b3694feed8514f9559c7b732ad6217e88c6 (diff)
Avoid timer starvation when handling many X11 events
After commit d0d0fdb8e46351b4ab8492de31e5363ef6662b57, timers are normally run at idle priority. This makes it possible for the X11 handler to starve timers indefinitely. Fix this by enforcing one normal priority pass of the timer source after we have processed all X11 events. This has the added benefit of keeping animation timers smooth and consistent, which is the intention of this change. Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_glib_p.h')
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h
index 6a4e7260c7..57cbf946c4 100644
--- a/src/corelib/kernel/qeventdispatcher_glib_p.h
+++ b/src/corelib/kernel/qeventdispatcher_glib_p.h
@@ -110,6 +110,8 @@ public:
GSocketNotifierSource *socketNotifierSource;
GTimerSource *timerSource;
GIdleTimerSource *idleTimerSource;
+
+ void runTimersOnceWithNormalPriority();
};
QT_END_NAMESPACE