QWindowsBackingStore::flush(): Add warning for UpdateLayeredWindowIndirect() failures.

Task-number: QTBUG-49785
Change-Id: I881e6d294ae6b23e280e727ee1fc48ee6562f2fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
bb10
Friedemann Kleint 2015-12-07 16:33:20 +01:00
parent 69efc425b2
commit be9df4bc82
1 changed files with 6 additions and 1 deletions

View File

@ -96,7 +96,12 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion &region,
RECT dirty = {dirtyRect.x(), dirtyRect.y(),
dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()};
UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, &ptDst, &size, m_image->hdc(), &ptSrc, 0, &blend, ULW_ALPHA, &dirty};
QWindowsContext::user32dll.updateLayeredWindowIndirect(rw->handle(), &info);
const BOOL result = QWindowsContext::user32dll.updateLayeredWindowIndirect(rw->handle(), &info);
if (!result)
qErrnoWarning("UpdateLayeredWindowIndirect failed for ptDst=(%d, %d),"
" size=(%dx%d), dirty=(%dx%d %d, %d)", r.x(), r.y(),
r.width(), r.height(), dirtyRect.width(), dirtyRect.height(),
dirtyRect.x(), dirtyRect.y());
} else {
QWindowsContext::user32dll.updateLayeredWindow(rw->handle(), NULL, &ptDst, &size, m_image->hdc(), &ptSrc, 0, &blend, ULW_ALPHA);
}