2017-08-18 11:11:49 +00:00
|
|
|
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
|
|
index 5e136b5..0ad2842 100644
|
|
|
|
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
|
|
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
|
|
@@ -620,7 +620,7 @@ void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation)
|
2017-01-24 14:45:22 +00:00
|
|
|
m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi());
|
2017-08-18 11:11:49 +00:00
|
|
|
|
2017-01-24 14:45:22 +00:00
|
|
|
qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4);
|
2017-08-18 11:11:49 +00:00
|
|
|
- m_pixelDensity = qMax(1, qRound(dpi/96));
|
|
|
|
+ m_pixelDensity = qMax(1, (int) (dpi/96)); // instead of rounding at 1.5, round at 2.0 (same as GNOME)
|
2017-01-24 14:45:22 +00:00
|
|
|
m_geometry = QRect(xGeometry.topLeft(), xGeometry.size());
|
|
|
|
m_availableGeometry = xGeometry & m_virtualDesktop->workArea();
|
|
|
|
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
|