QWindowsBackingStore: Flush to correct window.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Fri, 27 Apr 2012 12:01:26 +0000 (14:01 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 27 Apr 2012 18:15:52 +0000 (20:15 +0200)
Task-number: QTBUG-25435

Change-Id: I13f57a328a7ac3402fe0def9d724f7e700016c80
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/plugins/platforms/windows/qwindowsbackingstore.cpp

index 2cf9645..fad7dbd 100644 (file)
@@ -78,11 +78,12 @@ QPaintDevice *QWindowsBackingStore::paintDevice()
 void QWindowsBackingStore::flush(QWindow *window, const QRegion &region,
                                         const QPoint &offset)
 {
+    Q_ASSERT(window);
     // TODO: Prepare paint for translucent windows.
     const QRect br = region.boundingRect();
     if (QWindowsContext::verboseBackingStore > 1)
         qDebug() << __FUNCTION__ << window << offset << br;
-    QWindowsWindow *rw = rasterWindow();
+    QWindowsWindow *rw = QWindowsWindow::baseWindowOf(window);
     const HDC dc = rw->getDC();
     if (!dc) {
         qErrnoWarning("%s: GetDC failed", __FUNCTION__);