summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-07-21 11:37:43 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-08-04 14:57:54 (GMT)
commited375675d4a4f6fd63edeb242e23c87b3de4be6f (patch)
tree2da8d40704bdf17494a4e40504bffc78fc159cf6
parent2764dc0a0f4f8f6c87e716817ae99a7b57cdd23e (diff)
downloadQt-ed375675d4a4f6fd63edeb242e23c87b3de4be6f.zip
Qt-ed375675d4a4f6fd63edeb242e23c87b3de4be6f.tar.gz
Qt-ed375675d4a4f6fd63edeb242e23c87b3de4be6f.tar.bz2
Fix: Gtk native dialogs do not repaint when zero-timers are used
The problem was that our glib timers were given too high priority, effectively starving the Gtk event loop. By assigning our timer source, G_PRIORITY_DEFAULT_IDLE we ensure that all gtk+ events are handled first, thus allowing the native dialogs to respond and repaint properly. Task-number: 258433 Reviewed-by: bhughes
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 7610631..2bbe560 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -263,6 +263,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
(void) new (&timerSource->timerList) QTimerInfoList();
timerSource->processEventsFlags = QEventLoop::AllEvents;
g_source_set_can_recurse(&timerSource->source, true);
+ g_source_set_priority(&timerSource->source, G_PRIORITY_DEFAULT_IDLE);
g_source_attach(&timerSource->source, mainContext);
}