xcb: cleanup leftovers in QXcbScreen::updateGeometry

That code was added by ae5f2a6672 and
later incompletely removed by c173a50719.

This patch amends c173a50719.

Change-Id: Ibfd39aaf9b49424fc54d878dc588454eb841ed97
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Gatis Paeglis 2017-07-19 11:16:44 +02:00
parent 6c10c54aa8
commit 284fff1217
2 changed files with 6 additions and 7 deletions

View File

@ -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);
}

View File

@ -198,7 +198,7 @@ public:
QString name() const override { return m_outputName; }
void handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event);
void updateGeometry(const QRect &geom, uint8_t rotation);
void updateGeometry(const QRect &geometry, uint8_t rotation);
void updateGeometry(xcb_timestamp_t timestamp = XCB_TIME_CURRENT_TIME);
void updateAvailableGeometry();
void updateRefreshRate(xcb_randr_mode_t mode);