diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-24 14:47:20 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-02-24 14:47:20 +0000 |
commit | b736151c2bb6c68f700d38274d740a6e0cf59a49 (patch) | |
tree | 83e110a7205757addba6e86a3c2367e4b52afa05 /src/plugins/platforms/windows/qwindowsbackingstore.cpp | |
parent | ff76300a5c9f209f625384f35ad0fdb0acebd799 (diff) | |
parent | 1fadc7292b66d4b3984bf5ef36c70b46b07a1c6b (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsbackingstore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp index b265054e12..7123ed826d 100644 --- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp +++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp @@ -100,7 +100,7 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion, SIZE size = {r.width(), r.height()}; POINT ptDst = {r.x(), r.y()}; POINT ptSrc = {0, 0}; - BLENDFUNCTION blend = {AC_SRC_OVER, 0, (BYTE)(255.0 * rw->opacity()), AC_SRC_ALPHA}; + 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()}; @@ -126,7 +126,7 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion, m_image->hdc(), br.x() + offset.x(), br.y() + offset.y(), SRCCOPY)) { const DWORD lastError = GetLastError(); // QTBUG-35926, QTBUG-29716: may fail after lock screen. if (lastError != ERROR_SUCCESS && lastError != ERROR_INVALID_HANDLE) - qErrnoWarning(lastError, "%s: BitBlt failed", __FUNCTION__); + qErrnoWarning(int(lastError), "%s: BitBlt failed", __FUNCTION__); } rw->releaseDC(); #ifndef Q_OS_WINCE |