Make sure window manager wakeup() can always wake up
authorCharles Yin <yinyunqiao@gmail.com>
Fri, 23 Mar 2012 16:17:35 +0000 (02:17 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 26 Mar 2012 04:10:56 +0000 (06:10 +0200)
1. Change isExternalUpdatePending to true to avoid window manager sleep again immediately
   without processing any events
2. Also wake up the window manager if wait at posting sync event

Change-Id: I184dba32a66379b688b585c27c4d01799c233e84
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickwindowmanager.cpp

index 61c2ef2..bac5cc7 100644 (file)
@@ -1120,7 +1120,8 @@ void QQuickRenderThreadSingleContextWindowManager::maybeUpdate(QQuickCanvas *)
 void QQuickRenderThreadSingleContextWindowManager::wakeup()
 {
     lockInGui();
-    if (isRenderBlocked)
+    isExternalUpdatePending = true;
+    if (isRenderBlocked || isPostingSyncEvent)
         wake();
     unlockInGui();
 }