From 5cbc4609906bbd0484344f96643840ffdc723d69 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 9 Mar 2016 09:14:23 +0100 Subject: Windows QPA: Increase API level to 0x600 (Windows Vista). - Directly link against dwmapi which should be present on Windows Vista and remove duplicated header constants. - Remove struct QWindowsShell32DL since all required functions are present on Windows Vista. - Remove functions that are no longer needed from QWindowsUser32DLL with exception of the clipboard functions which are not present in the MinGW stub libraries until v5. Task-number: QTBUG-51673 Change-Id: Ia4a8a3f1db0f0d02322317d547e61ae39f9008b5 Reviewed-by: Oliver Wolff --- .../platforms/windows/qwindowsbackingstore.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsbackingstore.cpp') diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp index df6749ad25..2d5e4071bc 100644 --- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp +++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp @@ -100,19 +100,15 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion, POINT ptDst = {r.x(), r.y()}; POINT ptSrc = {0, 0}; BLENDFUNCTION blend = {AC_SRC_OVER, 0, BYTE(qRound(255.0 * rw->opacity())), AC_SRC_ALPHA}; - if (QWindowsContext::user32dll.updateLayeredWindowIndirect) { - 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}; - 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); - } + 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}; + const BOOL result = 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 { const HDC dc = rw->getDC(); if (!dc) { -- cgit v1.2.3