From 892807623154a81b984baf4d525a55e7c4a29b07 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 20 Nov 2015 09:45:53 +0100 Subject: 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 --- src/plugins/platforms/windows/qwindowsbackingstore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms') 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 ®ion, 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(Q_NULLPTR))); QRect dirtyRect = br.translated(offset + frameOffset); SIZE size = {r.width(), r.height()}; -- cgit v1.2.3