summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2016-02-18 14:05:39 +0100
committerBłażej Szczygieł <spaz16@wp.pl>2016-02-19 16:35:29 +0000
commit3f4eba746d23550be19dc4edafe193fa5ce0d3d4 (patch)
tree703f5bd9e6b901175a8fdab63837be634f5b7a0a /src
parent7cd23a7d5f5b7b10c0e317afcf8bc49020a42e53 (diff)
xcb: properly initialize size in millimeters if XRandR is not supported
QXcbScreen did not set the m_sizeMillimeters if the xcb connection does not support XRandR. This caused physicalSize() to return an invalid QSize. This change fixes a regression compared to Qt 5.4 discovered by a broken unit test for KWin on KDE's CI system, which uses Xvfb and by that no XRandR support. Task-number: QTBUG-49885 Change-Id: Ie472a194ba410f0748ccfda8aa467727fafa10a3 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 0ef7166b90..28b1753712 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -210,6 +210,9 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDe
if (m_availableGeometry.isEmpty())
m_availableGeometry = m_geometry & m_virtualDesktop->workArea();
+ if (m_sizeMillimeters.isEmpty())
+ m_sizeMillimeters = m_virtualSizeMillimeters;
+
readXResources();
QScopedPointer<xcb_get_window_attributes_reply_t, QScopedPointerPodDeleter> rootAttribs(