diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-10-03 13:47:19 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-10-03 13:47:19 +0300 |
commit | 8a5f6c7f81eef21db425038b213e84dd25ed336d (patch) | |
tree | d3bb5fa3079fb7a35e641164941b70c435e1d48b /src/plugins/platforms/xcb | |
parent | 4ad98906e9931b50a51080a7880951a173c4c3f9 (diff) | |
parent | 938cdd2629732988bb815b5ceb14dab4563311d7 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-6.2.7' into tqtc/lts-6.2-opensource
Change-Id: Ie70d33341cccaaa69968dc8d1337ec27d7895127
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qt_xlib_wrapper.c | 44 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qt_xlib_wrapper.h | 54 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 8 |
4 files changed, 108 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt index 392b2c6cb6..c9dd456ab3 100644 --- a/src/plugins/platforms/xcb/CMakeLists.txt +++ b/src/plugins/platforms/xcb/CMakeLists.txt @@ -83,6 +83,8 @@ qt_internal_extend_target(XcbQpaPrivate CONDITION QT_FEATURE_draganddrop ) qt_internal_extend_target(XcbQpaPrivate CONDITION QT_FEATURE_xcb_xlib + SOURCES + qt_xlib_wrapper.c qt_xlib_wrapper.h PUBLIC_LIBRARIES X11::XCB # special case begin diff --git a/src/plugins/platforms/xcb/qt_xlib_wrapper.c b/src/plugins/platforms/xcb/qt_xlib_wrapper.c new file mode 100644 index 0000000000..3ff7120291 --- /dev/null +++ b/src/plugins/platforms/xcb/qt_xlib_wrapper.c @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2022 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +******************************************************************************/ + +#include "qt_xlib_wrapper.h" + +#include <X11/Xlib.h> + +void qt_XFlush(Display *dpy) { XFlush(dpy); } diff --git a/src/plugins/platforms/xcb/qt_xlib_wrapper.h b/src/plugins/platforms/xcb/qt_xlib_wrapper.h new file mode 100644 index 0000000000..3f77068348 --- /dev/null +++ b/src/plugins/platforms/xcb/qt_xlib_wrapper.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2022 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +** +******************************************************************************/ + +#ifndef QT_XLIB_WRAPPER_H +#define QT_XLIB_WRAPPER_H + +#ifdef __cplusplus +extern "C" { +#endif + + typedef struct _XDisplay Display; + void qt_XFlush(Display *dpy); + +#ifdef __cplusplus +} +#endif + +#endif // QT_XLIB_WRAPPER_H diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 9bb069b70c..f4b829350a 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -71,6 +71,10 @@ #undef explicit #include <xcb/xinput.h> +#if QT_CONFIG(xcb_xlib) +#include "qt_xlib_wrapper.h" +#endif + QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcQpaXInput, "qt.qpa.input") @@ -1105,6 +1109,10 @@ void QXcbConnection::processXcbEvents(QEventLoop::ProcessEventsFlags flags) m_eventQueue->flushBufferedEvents(); } +#if QT_CONFIG(xcb_xlib) + qt_XFlush(static_cast<Display *>(xlib_display())); +#endif + xcb_flush(xcb_connection()); } |