From 8cb1b07aea12d50b4fecc45c903705dfd368022a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 13 Nov 2020 11:21:50 +0100 Subject: Make setting QT_SCALE_FACTOR work on Wayland QWindow geometry accessors return geometry in device independent pixels. Normally this coordinate system is equivalent to the Wayland native coordinate system, but this is not the case when QT_SCALE_FACTOR is set. Replace QWindow geometry calls with the helpers from QPlatformWindow which return geometry in the native coordinate system: QWindow::geometry() -> QPlatformWindow::windowGeometry() QWindow::frameGeometry() -> QPlatformWindow::windowFrameGeometry() Task-number: QTBUG-87762 Fixes: QTBUG-88064 Change-Id: I8c96237b49c754bb978f1739d090962be770c271 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp') diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp index 245fec196..8f41118d8 100644 --- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp +++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp @@ -134,7 +134,7 @@ void QWaylandWlShellSurface::applyConfigure() { if ((m_pending.states & (Qt::WindowMaximized|Qt::WindowFullScreen)) && !(m_applied.states & (Qt::WindowMaximized|Qt::WindowFullScreen))) { - m_normalSize = m_window->window()->frameGeometry().size(); + m_normalSize = m_window->windowFrameGeometry().size(); } if (m_pending.states != m_applied.states) -- cgit v1.2.3