Fix "Unsupported extension used" error

This error message was a result of calling *_randr_* functions
in QXcbWindow::updateGeometry without checking if the X server
provides the XRandR extension.

Change-Id: I165f201c32ca0f4976f9ff9b9f17323098940511
Task-number: QTBUG-45624
Task-number: QTBUG-45388
Task-number: QTBUG-45312
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jan Kundrát <jkt@kde.org>
This commit is contained in:
Gatis Paeglis 2015-04-21 16:11:20 +02:00 committed by Gatis Paeglis
parent 4c96367410
commit 628fa13ea4

View File

@ -468,6 +468,9 @@ void QXcbScreen::handleScreenChange(xcb_randr_screen_change_notify_event_t *chan
void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp) void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp)
{ {
if (!connection()->hasXRandr())
return;
xcb_randr_get_crtc_info_cookie_t crtcCookie = xcb_randr_get_crtc_info_cookie_t crtcCookie =
xcb_randr_get_crtc_info_unchecked(xcb_connection(), m_crtc, timestamp); xcb_randr_get_crtc_info_unchecked(xcb_connection(), m_crtc, timestamp);
xcb_randr_get_crtc_info_reply_t *crtc = xcb_randr_get_crtc_info_reply_t *crtc =