diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-02-19 10:09:19 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-08-27 01:06:40 +0200 |
commit | 60588e1a5dd9b10803e078c741271cbe5713a51b (patch) | |
tree | ea23ed6e0700aadcba7c323261e331dadd8af132 /src/plugins/platforms/xcb/qxcbconnection.cpp | |
parent | 5bb178c479a247720fbc3fbb7f06a32b725193ac (diff) |
3rdparty: remove xcb libs and bump minimal required version to 1.11
With libxcb 1.11 as minimal required version we can:
(a) (Maybe) Enable threaded GL for MESA, see QTBUG-67277.
(b) Avoid performance issues described in QTBUG-46017. Bundled xcb libs don't
contain the more modern SHM fd passing APIs. The official binaries use
"-qt-xcb", therefore we were shipping with the performance fix #ifdef-ed out.
(c) Make xcb-xkb a mandatory dependency avoiding issues described in QTBUG-30911.
Issues that appear when Qt was configure with "-no-xkb -xcb-xlib", but
X server has the XKB extension.
(d) Drop all, but xcb-xinput sources from src/3rdparty/xcb/, for which
we need "xcb-xinput >= 1.12". This way we can reduce maintenance
work. The xcb libraries were origianlly bundled because of lack of availability
on supported distributions. This is not the case anymore:
CI for Qt 5.13 has:
Ubuntu 18.04 - libxcb 1.13
RHEL 7.4 - libxcb 1.13
openSUSE 15.0 - libxcb 1.13
CI for Qt 5.12 has:
Ubuntu 16.04 - libxcb 1.11
RHEL 7.4 - libxcb 1.13
openSUSE 42.3 - libxcb 1.11
RHEL 6.x - not relevant because it was dropped from supported platforms.
Why 1.11 (released on Aug, 2014), but not 1.13 (released on March 2018)?
Based on what we have in CI for 5.13 and 5.14 we could update to 1.13,
but it means that Qt would require a very recent version of 3rd party
dependency.
[ChangeLog][Configure][X11] The minimal required version of libxcb now is 1.11.
[ChangeLog][Third-Party Code][X11] Removed all bundled XCB libs, with
the exception of xcb-xinput, which is not available on systems with
libxcb 1.11.
[ChangeLog][Configure][X11] Removed -qt-xcb, -system-xcb, -xkb, -xcb-xinput switches.
[ChangeLog][Platform Specific Changes][X11] XKB and XInput2 now are mandatory
dependencies for XCB plugin. XCB-XKB is a part of libxcb 1.11 releases.
XCB-XInput is not part of libxcb 1.11 releases, but Qt builders can use
-bundled-xcb-xinput switch.
Fixes: QTBUG-73862
Fixes: QTBUG-73888
Task-number: QTBUG-67277
Task-number: QTBUG-30939
Change-Id: I4c2bd2a0e667220d32fd1fbfa1419c844f17fcce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index cac6345b66..e51c3d0502 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -66,14 +66,10 @@ #include <errno.h> #include <xcb/xfixes.h> -#if QT_CONFIG(xkb) #define explicit dont_use_cxx_explicit #include <xcb/xkb.h> #undef explicit -#endif -#if QT_CONFIG(xcb_xinput) #include <xcb/xinput.h> -#endif QT_BEGIN_NAMESPACE @@ -88,12 +84,6 @@ Q_LOGGING_CATEGORY(lcQpaKeyboard, "qt.qpa.xkeyboard") Q_LOGGING_CATEGORY(lcQpaClipboard, "qt.qpa.clipboard") Q_LOGGING_CATEGORY(lcQpaXDnd, "qt.qpa.xdnd") -// this event type was added in libxcb 1.10, -// but we support also older version -#ifndef XCB_GE_GENERIC -#define XCB_GE_GENERIC 35 -#endif - QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName) : QXcbBasicConnection(displayName) , m_canGrabServer(canGrabServer) @@ -112,12 +102,10 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra initializeScreens(); -#if QT_CONFIG(xcb_xinput) if (hasXInput2()) { xi2SetupDevices(); xi2SelectStateEvents(); } -#endif m_wmSupport.reset(new QXcbWMSupport(this)); m_keyboard = new QXcbKeyboard(this); @@ -518,7 +506,6 @@ Qt::MouseButton QXcbConnection::translateMouseButton(xcb_button_t s) } } -#if QT_CONFIG(xkb) namespace { typedef union { /* All XKB events share these fields. */ @@ -534,7 +521,6 @@ namespace { xcb_xkb_state_notify_event_t state_notify; } _xkb_event; } -#endif void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) { @@ -611,16 +597,12 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) HANDLE_PLATFORM_WINDOW_EVENT(xcb_client_message_event_t, window, handleClientMessageEvent); } case XCB_ENTER_NOTIFY: -#if QT_CONFIG(xcb_xinput) if (hasXInput2() && !xi2MouseEventsDisabled()) break; -#endif HANDLE_PLATFORM_WINDOW_EVENT(xcb_enter_notify_event_t, event, handleEnterNotifyEvent); case XCB_LEAVE_NOTIFY: -#if QT_CONFIG(xcb_xinput) if (hasXInput2() && !xi2MouseEventsDisabled()) break; -#endif m_keyboard->updateXKBStateFromCore(reinterpret_cast<xcb_leave_notify_event_t *>(event)->state); HANDLE_PLATFORM_WINDOW_EVENT(xcb_leave_notify_event_t, event, handleLeaveNotifyEvent); case XCB_FOCUS_IN: @@ -682,13 +664,11 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) } break; } -#if QT_CONFIG(xcb_xinput) case XCB_GE_GENERIC: // Here the windowEventListener is invoked from xi2HandleEvent() if (hasXInput2() && isXIEvent(event)) xi2HandleEvent(reinterpret_cast<xcb_ge_event_t *>(event)); break; -#endif default: handled = false; // event type not recognized break; @@ -712,7 +692,6 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) auto change_event = reinterpret_cast<xcb_randr_screen_change_notify_event_t *>(event); if (auto virtualDesktop = virtualDesktopForRootWindow(change_event->root)) virtualDesktop->handleScreenChange(change_event); -#if QT_CONFIG(xkb) } else if (isXkbType(response_type)) { auto xkb_event = reinterpret_cast<_xkb_event *>(event); if (xkb_event->any.deviceID == m_keyboard->coreDeviceId()) { @@ -735,7 +714,6 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) break; } } -#endif } else { handled = false; // event type still not recognized } @@ -912,7 +890,6 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event) const }); } -#if QT_CONFIG(xcb_xinput) // compress XI_* events if (responseType == XCB_GE_GENERIC) { if (!hasXInput2()) @@ -948,7 +925,6 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event) const return false; } -#endif if (responseType == XCB_CONFIGURE_NOTIFY) { // compress multiple configure notify events for the same window @@ -978,7 +954,6 @@ bool QXcbConnection::isUserInputEvent(xcb_generic_event_t *event) const if (isInputEvent) return true; -#if QT_CONFIG(xcb_xinput) if (connection()->hasXInput2()) { isInputEvent = isXIType(event, XCB_INPUT_BUTTON_PRESS) || isXIType(event, XCB_INPUT_BUTTON_RELEASE) || @@ -993,7 +968,6 @@ bool QXcbConnection::isUserInputEvent(xcb_generic_event_t *event) const } if (isInputEvent) return true; -#endif if (eventType == XCB_CLIENT_MESSAGE) { auto clientMessage = reinterpret_cast<const xcb_client_message_event_t *>(event); |