From 0d8019de0d861dcf30440332447bfaa07aa34102 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Tue, 22 Jun 2010 18:46:12 +0000 Subject: [PATCH] Add patch to fix event starving issue present in Qt 4.7tp1. Qt commit: http://qt.gitorious.org/qt/qt/commit/d22afdb8cf874aae3c5593f6108d4c7897a8ac20 Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-7502 --- ...afdb8cf874aae3c5593f6108d4c7897a8ac20.diff | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 3rdparty/d22afdb8cf874aae3c5593f6108d4c7897a8ac20.diff diff --git a/3rdparty/d22afdb8cf874aae3c5593f6108d4c7897a8ac20.diff b/3rdparty/d22afdb8cf874aae3c5593f6108d4c7897a8ac20.diff new file mode 100644 index 000000000..680cf99f5 --- /dev/null +++ b/3rdparty/d22afdb8cf874aae3c5593f6108d4c7897a8ac20.diff @@ -0,0 +1,37 @@ +--- a/src/gui/graphicsview/qgraphicsview_p.h ++++ b/src/gui/graphicsview/qgraphicsview_p.h +@@ -183,8 +183,12 @@ + else + QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest); + #else +- QCoreApplication::processEvents(QEventLoop::AllEvents | QEventLoop::ExcludeSocketNotifiers +- | QEventLoop::ExcludeUserInputEvents); ++ // At this point either HIViewSetNeedsDisplay (Carbon) or setNeedsDisplay: YES (Cocoa) ++ // is called, which means there's a pending update request. We want to dispatch it ++ // now because otherwise graphics view updates would require two ++ // round-trips in the event loop before the item is painted. ++ extern void qt_mac_dispatchPendingUpdateRequests(QWidget *); ++ qt_mac_dispatchPendingUpdateRequests(viewport->window()); + #endif + } + +--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm ++++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm +@@ -1167,6 +1167,17 @@ + return context; + } + ++void qt_mac_dispatchPendingUpdateRequests(QWidget *widget) ++{ ++ if (!widget) ++ return; ++#ifndef QT_MAC_USE_COCOA ++ HIViewRender(qt_mac_nativeview_for(widget)); ++#else ++ [qt_mac_nativeview_for(widget) displayIfNeeded]; ++#endif ++} ++ + CGFloat qt_mac_get_scalefactor() + { + #ifndef QT_MAC_USE_COCOA \ No newline at end of file