diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-29 10:25:24 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-07-30 12:44:58 +0000 |
commit | fd6821740fece8650cac7494a2cffe63e2bebb9c (patch) | |
tree | 15f5dddd919ad3cad52a6cf1cd554fd54e0e0635 /src/plugins/platforms/windows/qwindowsbackingstore.cpp | |
parent | a705b4ec1f6f7133390054f8b6b8077ef0550311 (diff) |
Highdpi changes for Windows
Adapt the Windows plugin to work with the new cross-platform
high-DPI scaling.
Task-number: QTBUG-38993
Task-number: QTBUG-46615
Change-Id: I108d319255925a290b75611e95ef006d4aaf7ace
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsbackingstore.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp index fe56d3dddc..3f19e4401a 100644 --- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp +++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp @@ -38,6 +38,7 @@ #include <QtGui/QWindow> #include <QtGui/QPainter> +#include <private/qhighdpiscaling_p.h> #include <QtCore/QDebug> @@ -82,8 +83,8 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion, const Qt::WindowFlags flags = window->flags(); if ((flags & Qt::FramelessWindowHint) && QWindowsWindow::setWindowLayered(rw->handle(), flags, hasAlpha, rw->opacity()) && hasAlpha) { // Windows with alpha: Use blend function to update. - QRect r = window->frameGeometry(); - QPoint frameOffset(window->frameMargins().left(), window->frameMargins().top()); + QRect r = QHighDpi::toNativePixels(window->frameGeometry(), window); + QPoint frameOffset(QHighDpi::toNativePixels(QPoint(window->frameMargins().left(), window->frameMargins().top()), window)); QRect dirtyRect = br.translated(offset + frameOffset); SIZE size = {r.width(), r.height()}; |