summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-20 09:45:53 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-20 19:12:15 +0000
commit892807623154a81b984baf4d525a55e7c4a29b07 (patch)
tree85b942636e46d74711b45cc5950b7e7950b794a1 /src/plugins/platforms
parent296eb88e1c87dc4793b12af4ddfcc67fe88b8ad8 (diff)
Windows: Fix calculation of frame offset for layered windows.
Pass 0 window to High DPI scaling function to prevent it from trying to find a screen and applying a screen offset. Task-number: QTBUG-49516 Change-Id: Ib3e1919985f2c6df1dd8369f6e28b3ee1fdb7afe Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
index 3f19e4401a..bd5c35037d 100644
--- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp
+++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
@@ -84,7 +84,8 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion &region,
if ((flags & Qt::FramelessWindowHint) && QWindowsWindow::setWindowLayered(rw->handle(), flags, hasAlpha, rw->opacity()) && hasAlpha) {
// Windows with alpha: Use blend function to update.
QRect r = QHighDpi::toNativePixels(window->frameGeometry(), window);
- QPoint frameOffset(QHighDpi::toNativePixels(QPoint(window->frameMargins().left(), window->frameMargins().top()), window));
+ QPoint frameOffset(QHighDpi::toNativePixels(QPoint(window->frameMargins().left(), window->frameMargins().top()),
+ static_cast<const QWindow *>(Q_NULLPTR)));
QRect dirtyRect = br.translated(offset + frameOffset);
SIZE size = {r.width(), r.height()};