xcb: Don't get initial screen rotation

"xcb_randr_get_screen_info" can be slow and in some configurations can
cause short mouse cursor freezes (which will happen on Qt application
startup).

Initial screen rotation was used only to not handle possible redundant
screen change event.

Fixes: QTBUG-70760
Change-Id: I9f01325a045d2c82c4dd2fce91a18a34e54a4bcd
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
bb10
Błażej Szczygieł 2018-09-25 18:45:10 +02:00 committed by Gatis Paeglis
parent d2e0e416d4
commit d4e937a628
2 changed files with 1 additions and 8 deletions

View File

@ -118,13 +118,6 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t
xcb_depth_next(&depth_iterator);
}
if (connection->hasXRandr()) {
xcb_connection_t *conn = connection->xcb_connection();
auto screen_info = Q_XCB_REPLY(xcb_randr_get_screen_info, conn, screen->root);
if (screen_info)
m_rotation = screen_info->rotation;
}
}
QXcbVirtualDesktop::~QXcbVirtualDesktop()

View File

@ -220,7 +220,7 @@ private:
xcb_randr_crtc_t m_crtc;
xcb_randr_mode_t m_mode = XCB_NONE;
bool m_primary = false;
uint8_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0;
uint8_t m_rotation = 0;
QString m_outputName;
QSizeF m_outputSizeMillimeters;