From 284fff12172095a899303d9b4fc06c7bf502c93d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 19 Jul 2017 11:16:44 +0200 Subject: xcb: cleanup leftovers in QXcbScreen::updateGeometry That code was added by ae5f2a66720a4bb22c120bd7d1564652cac00367 and later incompletely removed by c173a5071906867de9da26ee8f49224b23c2ef1d. This patch amends c173a5071906867de9da26ee8f49224b23c2ef1d. Change-Id: Ibfd39aaf9b49424fc54d878dc588454eb841ed97 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qxcbscreen.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbscreen.cpp') diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp index 9d6f19460e..ec0f9ba561 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -719,9 +719,8 @@ void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp) updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation); } -void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation) +void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation) { - QRect xGeometry = geom; switch (rotation) { case XCB_RANDR_ROTATION_ROTATE_0: // xrandr --rotate normal m_orientation = Qt::LandscapeOrientation; @@ -745,12 +744,12 @@ void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation) // is known (probably back-calculated from DPI and resolution), // e.g. on VNC or with some hardware. if (m_sizeMillimeters.isEmpty()) - m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi()); + m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi()); - qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4); + qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4); m_pixelDensity = qMax(1, qRound(dpi/96)); - m_geometry = QRect(xGeometry.topLeft(), xGeometry.size()); - m_availableGeometry = xGeometry & m_virtualDesktop->workArea(); + m_geometry = geometry; + m_availableGeometry = geometry & m_virtualDesktop->workArea(); QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); } -- cgit v1.2.3