From 216da37cc55c38a9901501ecb04f768ff4e78d8f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 18 Jul 2017 14:14:17 +0200 Subject: Windows QPA: Compare against correct geometry when checking for fullscreen Do not scale the QPlatformScreen's geometry. Fixes tst_QWidget::showFullScreen() when run with a scale factor. Change-Id: I4a2e743303ff70b01fd3d2086281a790737d2c1d Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 3a5baf40f0..97550cbcf6 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1763,7 +1763,7 @@ bool QWindowsWindow::isFullScreen_sys() const if (testFlag(HasBorderInFullScreen)) geometry += QMargins(1, 1, 1, 1); QPlatformScreen *screen = screenForGeometry(geometry); - return screen && geometry == QHighDpi::toNativePixels(screen->geometry(), screen); + return screen && geometry == screen->geometry(); } /*! -- cgit v1.2.3 From ea4fae0df689843fbcd6cf7f170d825557646ea2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 17 Jul 2017 14:58:45 +0200 Subject: Windows QPA: Do not call enableNonClientDpiScaling() for embedded windows Do not call if the property indicating embedded windows is set. Task-number: QTBUG-61972 Change-Id: I8f34dd8a59f1e5c9c8064646bcb15acea115cd68 Reviewed-by: Oliver Wolff Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowswindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 97550cbcf6..3c79c8aefe 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -489,7 +489,7 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag // Sometimes QWindow doesn't have a QWindow parent but does have a native parent window, // e.g. in case of embedded ActiveQt servers. They should not be considered a top-level // windows in such cases. - QVariant prop = w->property("_q_embedded_native_parent_handle"); + QVariant prop = w->property(QWindowsWindow::embeddedNativeParentHandleProperty); if (prop.isValid()) { embedded = true; parentHandle = reinterpret_cast(prop.value()); @@ -1035,6 +1035,8 @@ QWindowCreationContext::QWindowCreationContext(const QWindow *w, \ingroup qt-lighthouse-win */ +const char *QWindowsWindow::embeddedNativeParentHandleProperty = "_q_embedded_native_parent_handle"; + QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data) : QWindowsBaseWindow(aWindow), m_data(data), -- cgit v1.2.3