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>
This commit is contained in:
parent
7cd23a7d5f
commit
3f4eba746d
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user