diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-04-08 18:50:15 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-04-13 09:54:41 +0000 |
commit | d8667fde189fa08002295fc66414d67e73b3c67b (patch) | |
tree | 47f6a3c8ed2f26d0f010d1c0e2528c9bf4c3da0e /src/plugins | |
parent | dbe9a8c9696428529cacb9dd4e004db99914b56e (diff) |
xcb: Fix interpretation of the size from RRCrtcChangeNotify
The size in RRCrtcChangeNotify is a size of the mode and it is
not rotated. At the same time when we call RRGetCrtcInfo, it
returns a rotated size, which is then passed to
QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation).
So to pass the expected size to QXcbScreen::updateGeometry()
after receiving RRCrtcChangeNotify, we should rotate the size
according the screen rotation.
Change-Id: If5b5b52403b077d3cd64b9a05d938bb9ac00b1e0
Reviewed-by: Daniel Vrátil <daniel.vratil@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 05c02249cc..135c763dc1 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -209,6 +209,9 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event) // CRTC with node mode could mean that output has been disabled, and we'll // get RRNotifyOutputChange notification for that. if (screen && crtc.mode) { + if (crtc.rotation == XCB_RANDR_ROTATION_ROTATE_90 || + crtc.rotation == XCB_RANDR_ROTATION_ROTATE_270) + std::swap(crtc.width, crtc.height); screen->updateGeometry(QRect(crtc.x, crtc.y, crtc.width, crtc.height), crtc.rotation); if (screen->mode() != crtc.mode) screen->updateRefreshRate(crtc.mode); |