From dc84907e408d97a99e9645456944a72362257fa7 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 12 Jul 2019 20:53:24 +0000 Subject: [PATCH] qt5dxcb-plugin: rebuild against qt5.13 --- .../deepin-qt5dxcb-plugin-qt5.13.patch | 22 + .../patches/{qt5.11.3.patch => qt5.13.patch} | 1883 +++++++++-------- srcpkgs/qt5dxcb-plugin/template | 4 +- 3 files changed, 1033 insertions(+), 876 deletions(-) create mode 100644 srcpkgs/qt5dxcb-plugin/patches/deepin-qt5dxcb-plugin-qt5.13.patch rename srcpkgs/qt5dxcb-plugin/patches/{qt5.11.3.patch => qt5.13.patch} (77%) diff --git a/srcpkgs/qt5dxcb-plugin/patches/deepin-qt5dxcb-plugin-qt5.13.patch b/srcpkgs/qt5dxcb-plugin/patches/deepin-qt5dxcb-plugin-qt5.13.patch new file mode 100644 index 00000000000..c10713c1d99 --- /dev/null +++ b/srcpkgs/qt5dxcb-plugin/patches/deepin-qt5dxcb-plugin-qt5.13.patch @@ -0,0 +1,22 @@ +diff --git a/platformplugin/windoweventhook.cpp b/platformplugin/windoweventhook.cpp +index 742b41d..428dcb0 100644 +--- a/platformplugin/windoweventhook.cpp ++++ b/platformplugin/windoweventhook.cpp +@@ -359,6 +359,8 @@ void WindowEventHook::handleFocusInEvent(const xcb_focus_in_event_t *event) + if (relayFocusToModalWindow(w, xcbWindow->connection())) + return; + ++ xcbWindow->connection()->focusInTimer().stop(); ++ + #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) + xcbWindow->connection()->setFocusWindow(w); + #else +@@ -433,7 +435,7 @@ void WindowEventHook::handleFocusOutEvent(const xcb_focus_out_event_t *event) + // Do not set the active window to 0 if there is a FocusIn coming. + // There is however no equivalent for XPutBackEvent so register a + // callback for QXcbConnection instead. +- xcbWindow->connection()->addPeekFunc(focusInPeeker); ++ xcbWindow->connection()->focusInTimer().start(400); + } + + void WindowEventHook::handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) diff --git a/srcpkgs/qt5dxcb-plugin/patches/qt5.11.3.patch b/srcpkgs/qt5dxcb-plugin/patches/qt5.13.patch similarity index 77% rename from srcpkgs/qt5dxcb-plugin/patches/qt5.11.3.patch rename to srcpkgs/qt5dxcb-plugin/patches/qt5.13.patch index 4c0f14232c1..1824774c476 100644 --- a/srcpkgs/qt5dxcb-plugin/patches/qt5.11.3.patch +++ b/srcpkgs/qt5dxcb-plugin/patches/qt5.13.patch @@ -1,13 +1,13 @@ -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbbackingstore.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbbackingstore.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbbackingstore.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbbackingstore.h 2018-12-15 11:51:30.627161826 +0100 -@@ -0,0 +1,88 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbatom.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbatom.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbatom.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbatom.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,257 @@ +/**************************************************************************** +** -+** Copyright (C) 2016 The Qt Company Ltd. ++** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** -+** This file is part of the plugins of the Qt Toolkit. ++** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage @@ -40,291 +40,14 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +** $QT_END_LICENSE$ +** +****************************************************************************/ -+ -+#ifndef QXCBBACKINGSTORE_H -+#define QXCBBACKINGSTORE_H -+ -+#include -+#include ++#ifndef QXCBATOM_H ++#define QXCBATOM_H + +#include + -+#include "qxcbobject.h" -+ -+QT_BEGIN_NAMESPACE -+ -+class QXcbBackingStoreImage; -+ -+class QXcbBackingStore : public QXcbObject, public QPlatformBackingStore ++class QXcbAtom +{ +public: -+ QXcbBackingStore(QWindow *window); -+ ~QXcbBackingStore(); -+ -+ QPaintDevice *paintDevice() override; -+ void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override; -+#ifndef QT_NO_OPENGL -+ void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, -+ QPlatformTextureList *textures, -+ bool translucentBackground) override; -+#endif -+ QImage toImage() const override; -+ -+ QPlatformGraphicsBuffer *graphicsBuffer() const override; -+ -+ void resize(const QSize &size, const QRegion &staticContents) override; -+ bool scroll(const QRegion &area, int dx, int dy) override; -+ -+ void beginPaint(const QRegion &) override; -+ void endPaint() override; -+ -+ static bool createSystemVShmSegment(QXcbConnection *c, size_t segmentSize = 1, -+ void *shmInfo = nullptr); -+ -+private: -+ QXcbBackingStoreImage *m_image = nullptr; -+ QStack m_paintRegions; -+ QImage m_rgbImage; -+}; -+ -+QT_END_NAMESPACE -+ -+#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbclipboard.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbclipboard.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbclipboard.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbclipboard.h 2018-12-15 11:51:30.627161826 +0100 -@@ -0,0 +1,119 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2016 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** 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. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#ifndef QXCBCLIPBOARD_H -+#define QXCBCLIPBOARD_H -+ -+#include -+#include -+#include -+#include -+ -+QT_BEGIN_NAMESPACE -+ -+#ifndef QT_NO_CLIPBOARD -+ -+class QXcbConnection; -+class QXcbScreen; -+class QXcbClipboardMime; -+ -+class QXcbClipboard : public QXcbObject, public QPlatformClipboard -+{ -+public: -+ QXcbClipboard(QXcbConnection *connection); -+ ~QXcbClipboard(); -+ -+ QMimeData *mimeData(QClipboard::Mode mode) override; -+ void setMimeData(QMimeData *data, QClipboard::Mode mode) override; -+ -+ bool supportsMode(QClipboard::Mode mode) const override; -+ bool ownsMode(QClipboard::Mode mode) const override; -+ -+ QXcbScreen *screen() const; -+ -+ xcb_window_t requestor() const; -+ void setRequestor(xcb_window_t window); -+ -+ xcb_window_t owner() const; -+ -+ void handleSelectionRequest(xcb_selection_request_event_t *event); -+ void handleSelectionClearRequest(xcb_selection_clear_event_t *event); -+ void handleXFixesSelectionRequest(xcb_xfixes_selection_notify_event_t *event); -+ -+ bool clipboardReadProperty(xcb_window_t win, xcb_atom_t property, bool deleteProperty, QByteArray *buffer, int *size, xcb_atom_t *type, int *format); -+ QByteArray clipboardReadIncrementalProperty(xcb_window_t win, xcb_atom_t property, int nbytes, bool nullterm); -+ -+ QByteArray getDataInFormat(xcb_atom_t modeAtom, xcb_atom_t fmtatom); -+ -+ void setProcessIncr(bool process) { m_incr_active = process; } -+ bool processIncr() { return m_incr_active; } -+ void incrTransactionPeeker(xcb_generic_event_t *ge, bool &accepted); -+ -+ xcb_window_t getSelectionOwner(xcb_atom_t atom) const; -+ QByteArray getSelection(xcb_atom_t selection, xcb_atom_t target, xcb_atom_t property, xcb_timestamp_t t = 0); -+ -+private: -+ xcb_generic_event_t *waitForClipboardEvent(xcb_window_t win, int type, int timeout, bool checkManager = false); -+ -+ xcb_atom_t sendTargetsSelection(QMimeData *d, xcb_window_t window, xcb_atom_t property); -+ xcb_atom_t sendSelection(QMimeData *d, xcb_atom_t target, xcb_window_t window, xcb_atom_t property); -+ -+ xcb_atom_t atomForMode(QClipboard::Mode mode) const; -+ QClipboard::Mode modeForAtom(xcb_atom_t atom) const; -+ -+ // Selection and Clipboard -+ QScopedPointer m_xClipboard[2]; -+ QMimeData *m_clientClipboard[2]; -+ xcb_timestamp_t m_timestamp[2]; -+ -+ xcb_window_t m_requestor = XCB_NONE; -+ xcb_window_t m_owner = XCB_NONE; -+ -+ static const int clipboard_timeout; -+ -+ bool m_incr_active = false; -+ bool m_clipboard_closing = false; -+ xcb_timestamp_t m_incr_receive_time = 0; -+}; -+ -+#endif // QT_NO_CLIPBOARD -+ -+QT_END_NAMESPACE -+ -+#endif // QXCBCLIPBOARD_H -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbconnection.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbconnection.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbconnection.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbconnection.h 2018-12-15 11:51:30.627161826 +0100 -@@ -0,0 +1,813 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2016 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** 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. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#ifndef QXCBCONNECTION_H -+#define QXCBCONNECTION_H -+ -+#include -+#include -+ -+#include -+#include "qxcbexport.h" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+// This is needed to make Qt compile together with XKB. xkb.h is using a variable -+// which is called 'explicit', this is a reserved keyword in c++ -+#if QT_CONFIG(xkb) -+#define explicit dont_use_cxx_explicit -+#include -+#undef explicit -+#endif -+ -+#if QT_CONFIG(tabletevent) -+#include -+#endif -+ -+#if QT_CONFIG(xinput2) -+#include -+#ifdef XIScrollClass -+#define XCB_USE_XINPUT21 // XI 2.1 adds smooth scrolling support -+#ifdef XI_TouchBeginMask -+#define XCB_USE_XINPUT22 // XI 2.2 adds multi-point touch support -+#endif -+#endif -+#endif // QT_CONFIG(xinput2) -+ -+struct xcb_randr_get_output_info_reply_t; -+ -+QT_BEGIN_NAMESPACE -+ -+Q_DECLARE_LOGGING_CATEGORY(lcQpaXInput) -+Q_DECLARE_LOGGING_CATEGORY(lcQpaXInputDevices) -+Q_DECLARE_LOGGING_CATEGORY(lcQpaXInputEvents) -+Q_DECLARE_LOGGING_CATEGORY(lcQpaScreen) -+Q_DECLARE_LOGGING_CATEGORY(lcQpaEvents) -+Q_DECLARE_LOGGING_CATEGORY(lcQpaXcb) -+Q_DECLARE_LOGGING_CATEGORY(lcQpaPeeker) -+Q_DECLARE_LOGGING_CATEGORY(lcQpaKeyboard) -+ -+class QXcbVirtualDesktop; -+class QXcbScreen; -+class QXcbWindow; -+class QXcbDrag; -+class QXcbKeyboard; -+class QXcbClipboard; -+class QXcbWMSupport; -+class QXcbNativeInterface; -+class QXcbSystemTrayTracker; -+class QXcbGlIntegration; -+ -+namespace QXcbAtom { + enum Atom { + // window-manager <-> client protocols + WM_PROTOCOLS, @@ -347,6 +70,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + WM_CLIENT_LEADER, + WM_WINDOW_ROLE, + SM_CLIENT_ID, ++ WM_CLIENT_MACHINE, + + // Clipboard + CLIPBOARD, @@ -464,16 +188,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + XdndActionMove, + XdndActionPrivate, + -+ // Motif DND -+ _MOTIF_DRAG_AND_DROP_MESSAGE, -+ _MOTIF_DRAG_INITIATOR_INFO, -+ _MOTIF_DRAG_RECEIVER_INFO, -+ _MOTIF_DRAG_WINDOW, -+ _MOTIF_DRAG_TARGETS, -+ -+ XmTRANSFER_SUCCESS, -+ XmTRANSFER_FAILURE, -+ + // Xkb + _XKB_RULES_NAMES, + @@ -522,50 +236,400 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + _COMPIZ_TOOLKIT_ACTION, + _GTK_LOAD_ICONTHEMES, + -+ NPredefinedAtoms, ++ AT_SPI_BUS, ++ ++ EDID, ++ EDID_DATA, ++ XFree86_DDC_EDID1_RAWDATA, + -+ _QT_SETTINGS_TIMESTAMP = NPredefinedAtoms, + NAtoms + }; -+} + -+typedef QVarLengthArray QXcbEventArray; ++ QXcbAtom(); ++ void initialize(xcb_connection_t *connection); ++ ++ inline xcb_atom_t atom(QXcbAtom::Atom atom) const { return m_allAtoms[atom]; } ++ QXcbAtom::Atom qatom(xcb_atom_t atom) const; ++ ++protected: ++ void initializeAllAtoms(xcb_connection_t *connection); ++ ++private: ++ xcb_atom_t m_allAtoms[QXcbAtom::NAtoms]; ++}; ++ ++#endif // QXCBATOM_H +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbbackingstore.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbbackingstore.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbbackingstore.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbbackingstore.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,116 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2016 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the plugins of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** 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. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QXCBBACKINGSTORE_H ++#define QXCBBACKINGSTORE_H ++ ++#include ++#include ++ ++#include ++ ++#include "qxcbobject.h" ++ ++QT_BEGIN_NAMESPACE ++ ++class QXcbBackingStoreImage; ++ ++class QXcbBackingStore : public QXcbObject, public QPlatformBackingStore ++{ ++public: ++ QXcbBackingStore(QWindow *window); ++ ~QXcbBackingStore(); ++ ++ QPaintDevice *paintDevice() override; ++ void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override; ++#ifndef QT_NO_OPENGL ++ void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, ++ QPlatformTextureList *textures, ++ bool translucentBackground) override; ++#endif ++ QImage toImage() const override; ++ ++ QPlatformGraphicsBuffer *graphicsBuffer() const override; ++ ++ void resize(const QSize &size, const QRegion &staticContents) override; ++ bool scroll(const QRegion &area, int dx, int dy) override; ++ ++ void beginPaint(const QRegion &) override; ++ void endPaint() override; ++ ++ static bool createSystemVShmSegment(xcb_connection_t *c, size_t segmentSize = 1, ++ void *shmInfo = nullptr); ++ ++protected: ++ virtual void render(xcb_window_t window, const QRegion ®ion, const QPoint &offset); ++ virtual void recreateImage(QXcbWindow *win, const QSize &size); ++ ++ QXcbBackingStoreImage *m_image = nullptr; ++ QStack m_paintRegions; ++ QImage m_rgbImage; ++}; ++ ++class QXcbSystemTrayBackingStore : public QXcbBackingStore ++{ ++public: ++ QXcbSystemTrayBackingStore(QWindow *window); ++ ~QXcbSystemTrayBackingStore(); ++ ++ void beginPaint(const QRegion &) override; ++ ++protected: ++ void render(xcb_window_t window, const QRegion ®ion, const QPoint &offset) override; ++ void recreateImage(QXcbWindow *win, const QSize &size) override; ++ ++private: ++ void initXRenderMode(); ++ ++ xcb_pixmap_t m_xrenderPixmap = XCB_NONE; ++ xcb_render_picture_t m_xrenderPicture = XCB_NONE; ++ xcb_render_pictformat_t m_xrenderPictFormat = XCB_NONE; ++ xcb_render_picture_t m_windowPicture = XCB_NONE; ++ ++ bool m_usingXRenderMode = false; ++ bool m_useGrabbedBackgound = false; ++ QPixmap m_grabbedBackground; ++}; ++ ++QT_END_NAMESPACE ++ ++#endif +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbclipboard.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbclipboard.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbclipboard.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbclipboard.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,152 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2016 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the plugins of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** 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. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QXCBCLIPBOARD_H ++#define QXCBCLIPBOARD_H ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++#ifndef QT_NO_CLIPBOARD + +class QXcbConnection; -+class QXcbEventReader : public QThread ++class QXcbScreen; ++class QXcbClipboard; ++class QXcbClipboardMime; ++ ++class QXcbClipboardTransaction : public QObject +{ + Q_OBJECT +public: -+ QXcbEventReader(QXcbConnection *connection); ++ QXcbClipboardTransaction(QXcbClipboard *clipboard, xcb_window_t w, xcb_atom_t p, ++ QByteArray d, xcb_atom_t t, int f); ++ ~QXcbClipboardTransaction(); + -+ void run() override; ++ bool updateIncrementalProperty(const xcb_property_notify_event_t *event); + -+ QXcbEventArray *lock(); -+ void unlock(); -+ -+ void start(); -+ -+ void registerEventDispatcher(QAbstractEventDispatcher *dispatcher); -+ -+signals: -+ void eventPending(); -+ -+private slots: -+ void registerForEvents(); ++protected: ++ void timerEvent(QTimerEvent *ev) override; + +private: -+ void addEvent(xcb_generic_event_t *event); -+ -+ QMutex m_mutex; -+ QXcbEventArray m_events; -+ QXcbConnection *m_connection; ++ QXcbClipboard *m_clipboard; ++ xcb_window_t m_window; ++ xcb_atom_t m_property; ++ QByteArray m_data; ++ xcb_atom_t m_target; ++ uint8_t m_format; ++ uint m_offset = 0; ++ int m_abortTimerId = 0; +}; + ++class QXcbClipboard : public QXcbObject, public QPlatformClipboard ++{ ++public: ++ QXcbClipboard(QXcbConnection *connection); ++ ~QXcbClipboard(); ++ ++ QMimeData *mimeData(QClipboard::Mode mode) override; ++ void setMimeData(QMimeData *data, QClipboard::Mode mode) override; ++ ++ bool supportsMode(QClipboard::Mode mode) const override; ++ bool ownsMode(QClipboard::Mode mode) const override; ++ ++ QXcbScreen *screen() const; ++ ++ xcb_window_t requestor() const; ++ void setRequestor(xcb_window_t window); ++ ++ xcb_window_t owner() const; ++ ++ void handleSelectionRequest(xcb_selection_request_event_t *event); ++ void handleSelectionClearRequest(xcb_selection_clear_event_t *event); ++ void handleXFixesSelectionRequest(xcb_xfixes_selection_notify_event_t *event); ++ ++ bool clipboardReadProperty(xcb_window_t win, xcb_atom_t property, bool deleteProperty, QByteArray *buffer, int *size, xcb_atom_t *type, int *format); ++ QByteArray clipboardReadIncrementalProperty(xcb_window_t win, xcb_atom_t property, int nbytes, bool nullterm); ++ ++ QByteArray getDataInFormat(xcb_atom_t modeAtom, xcb_atom_t fmtatom); ++ ++ bool handlePropertyNotify(const xcb_generic_event_t *event); ++ ++ xcb_window_t getSelectionOwner(xcb_atom_t atom) const; ++ QByteArray getSelection(xcb_atom_t selection, xcb_atom_t target, xcb_atom_t property, xcb_timestamp_t t = 0); ++ ++ int increment() const { return m_maxPropertyRequestDataBytes; } ++ int clipboardTimeout() const { return clipboard_timeout; } ++ ++ void removeTransaction(xcb_window_t window) { m_transactions.remove(window); } ++ ++private: ++ xcb_generic_event_t *waitForClipboardEvent(xcb_window_t window, int type, bool checkManager = false); ++ ++ xcb_atom_t sendTargetsSelection(QMimeData *d, xcb_window_t window, xcb_atom_t property); ++ xcb_atom_t sendSelection(QMimeData *d, xcb_atom_t target, xcb_window_t window, xcb_atom_t property); ++ ++ xcb_atom_t atomForMode(QClipboard::Mode mode) const; ++ QClipboard::Mode modeForAtom(xcb_atom_t atom) const; ++ ++ // Selection and Clipboard ++ QScopedPointer m_xClipboard[2]; ++ QMimeData *m_clientClipboard[2]; ++ xcb_timestamp_t m_timestamp[2]; ++ ++ xcb_window_t m_requestor = XCB_NONE; ++ xcb_window_t m_owner = XCB_NONE; ++ ++ static const int clipboard_timeout; ++ ++ int m_maxPropertyRequestDataBytes = 0; ++ bool m_clipboard_closing = false; ++ xcb_timestamp_t m_incr_receive_time = 0; ++ ++ using TransactionMap = QMap; ++ TransactionMap m_transactions; ++}; ++ ++#endif // QT_NO_CLIPBOARD ++ ++QT_END_NAMESPACE ++ ++#endif // QXCBCLIPBOARD_H +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,417 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2016 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the plugins of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** 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. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QXCBCONNECTION_H ++#define QXCBCONNECTION_H ++ ++#include ++#include ++ ++#include ++#include ++#include "qxcbexport.h" ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "qxcbeventqueue.h" ++#include "qxcbconnection_basic.h" ++ ++#if QT_CONFIG(tabletevent) ++#include ++#endif ++ ++QT_BEGIN_NAMESPACE ++ ++Q_DECLARE_LOGGING_CATEGORY(lcQpaXInput) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaXInputDevices) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaXInputEvents) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaScreen) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaEvents) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaPeeker) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaKeyboard) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaClipboard) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaXDnd) ++Q_DECLARE_LOGGING_CATEGORY(lcQpaEventReader) ++ ++class QXcbVirtualDesktop; ++class QXcbScreen; ++class QXcbWindow; ++class QXcbDrag; ++class QXcbKeyboard; ++class QXcbClipboard; ++class QXcbWMSupport; ++class QXcbNativeInterface; ++class QXcbSystemTrayTracker; ++class QXcbGlIntegration; ++ +class QXcbWindowEventListener +{ +public: + virtual ~QXcbWindowEventListener() {} -+ virtual bool handleGenericEvent(xcb_generic_event_t *, long *) { return false; } ++ virtual bool handleNativeEvent(xcb_generic_event_t *) { return false; } + + virtual void handleExposeEvent(const xcb_expose_event_t *) {} + virtual void handleClientMessageEvent(const xcb_client_message_event_t *) {} @@ -581,7 +645,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + virtual void handleFocusInEvent(const xcb_focus_in_event_t *) {} + virtual void handleFocusOutEvent(const xcb_focus_out_event_t *) {} + virtual void handlePropertyNotifyEvent(const xcb_property_notify_event_t *) {} -+#if QT_CONFIG(xinput2) ++#if QT_CONFIG(xcb_xinput) + virtual void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource = Qt::MouseEventNotSynthesized) {} + virtual void handleXIEnterLeave(xcb_ge_event_t *) {} +#endif @@ -602,8 +666,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QXcbWindow *m_window; +}; + -+class QAbstractEventDispatcher; -+class Q_XCB_EXPORT QXcbConnection : public QObject ++class Q_XCB_EXPORT QXcbConnection : public QXcbBasicConnection +{ + Q_OBJECT +public: @@ -611,22 +674,15 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + ~QXcbConnection(); + + QXcbConnection *connection() const { return const_cast(this); } -+ bool isConnected() const; ++ QXcbEventQueue *eventQueue() const { return m_eventQueue; } + + const QList &virtualDesktops() const { return m_virtualDesktops; } + const QList &screens() const { return m_screens; } -+ int primaryScreenNumber() const { return m_primaryScreenNumber; } -+ QXcbVirtualDesktop *primaryVirtualDesktop() const { return m_virtualDesktops.value(m_primaryScreenNumber); } ++ QXcbVirtualDesktop *primaryVirtualDesktop() const { ++ return m_virtualDesktops.value(primaryScreenNumber()); ++ } + QXcbScreen *primaryScreen() const; + -+ inline xcb_atom_t atom(QXcbAtom::Atom atom) const { return m_allAtoms[atom]; } -+ QXcbAtom::Atom qatom(xcb_atom_t atom) const; -+ xcb_atom_t internAtom(const char *name); -+ QByteArray atomName(xcb_atom_t atom); -+ -+ const char *displayName() const { return m_displayName.constData(); } -+ xcb_connection_t *xcb_connection() const { return m_connection; } -+ const xcb_setup_t *setup() const { return m_setup; } + const xcb_format_t *formatForDepth(uint8_t depth) const; + + bool imageNeedsEndianSwap() const @@ -634,9 +690,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + if (!hasShm()) + return false; // The non-Shm path does its own swapping +#if Q_BYTE_ORDER == Q_BIG_ENDIAN -+ return m_setup->image_byte_order != XCB_IMAGE_ORDER_MSB_FIRST; ++ return setup()->image_byte_order != XCB_IMAGE_ORDER_MSB_FIRST; +#else -+ return m_setup->image_byte_order != XCB_IMAGE_ORDER_LSB_FIRST; ++ return setup()->image_byte_order != XCB_IMAGE_ORDER_LSB_FIRST; +#endif + } + @@ -656,10 +712,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + bool hasDefaultVisualId() const { return m_defaultVisualId != UINT_MAX; } + xcb_visualid_t defaultVisualId() const { return m_defaultVisualId; } + -+#if QT_CONFIG(xcb_xlib) -+ void *xlib_display() const; -+ void *createVisualInfoForDefaultVisualId() const; -+#endif + void sync(); + + void handleXcbError(xcb_generic_error_t *error); @@ -673,44 +725,11 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QXcbWindowEventListener *windowEventListenerFromId(xcb_window_t id); + QXcbWindow *platformWindowFromId(xcb_window_t id); + -+ template -+ inline xcb_generic_event_t *checkEvent(T &checker); -+ -+ typedef bool (*PeekFunc)(QXcbConnection *, xcb_generic_event_t *); -+ void addPeekFunc(PeekFunc f); -+ -+ // Peek at all queued events -+ qint32 generatePeekerId(); -+ bool removePeekerId(qint32 peekerId); -+ enum PeekOption { PeekDefault = 0, PeekFromCachedIndex = 1 }; // see qx11info_x11.h -+ Q_DECLARE_FLAGS(PeekOptions, PeekOption) -+ typedef bool (*PeekerCallback)(xcb_generic_event_t *event, void *peekerData); -+ bool peekEventQueue(PeekerCallback peeker, void *peekerData = nullptr, -+ PeekOptions option = PeekDefault, qint32 peekerId = -1); -+ + inline xcb_timestamp_t time() const { return m_time; } -+ inline void setTime(xcb_timestamp_t t) { if (t > m_time) m_time = t; } ++ inline void setTime(xcb_timestamp_t t) { if (timeGreaterThan(t, m_time)) m_time = t; } + + inline xcb_timestamp_t netWmUserTime() const { return m_netWmUserTime; } -+ inline void setNetWmUserTime(xcb_timestamp_t t) { if (t > m_netWmUserTime) m_netWmUserTime = t; } -+ -+ bool hasXFixes() const { return has_xfixes; } -+ bool hasXShape() const { return has_shape_extension; } -+ bool hasXRandr() const { return has_randr_extension; } -+ bool hasInputShape() const { return has_input_shape; } -+ bool hasXKB() const { return has_xkb; } -+ bool hasXRender(int major = -1, int minor = -1) const -+ { -+ if (has_render_extension && major != -1 && minor != -1) -+ return m_xrenderVersion >= qMakePair(major, minor); -+ -+ return has_render_extension; -+ } -+ bool hasXInput2() const { return m_xi2Enabled; } -+ bool hasShm() const { return has_shm; } -+ bool hasShmFd() const { return has_shm_fd; } -+ -+ bool threadedEventHandling() const { return m_reader->isRunning(); } ++ inline void setNetWmUserTime(xcb_timestamp_t t) { if (timeGreaterThan(t, m_netWmUserTime)) m_netWmUserTime = t; } + + xcb_timestamp_t getTimestamp(); + xcb_window_t getSelectionOwner(xcb_atom_t atom) const; @@ -741,53 +760,39 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QXcbNativeInterface *nativeInterface() const { return m_nativeInterface; } + + QXcbSystemTrayTracker *systemTrayTracker() const; -+ static bool xEmbedSystemTrayAvailable(); -+ static bool xEmbedSystemTrayVisualHasAlphaChannel(); + -+#if QT_CONFIG(xinput2) ++ Qt::MouseButtons queryMouseButtons() const; ++ Qt::KeyboardModifiers queryKeyboardModifiers() const; ++ ++ bool isUserInputEvent(xcb_generic_event_t *event) const; ++ ++#if QT_CONFIG(xcb_xinput) + void xi2SelectStateEvents(); + void xi2SelectDeviceEvents(xcb_window_t window); + void xi2SelectDeviceEventsCompatibility(xcb_window_t window); + bool xi2SetMouseGrabEnabled(xcb_window_t w, bool grab); + bool xi2MouseEventsDisabled() const; -+ bool isAtLeastXI21() const { return m_xi2Enabled && m_xi2Minor >= 1; } -+ bool isAtLeastXI22() const { return m_xi2Enabled && m_xi2Minor >= 2; } + Qt::MouseButton xiToQtMouseButton(uint32_t b); -+#ifdef XCB_USE_XINPUT21 + void xi2UpdateScrollingDevices(); -+#endif -+#ifdef XCB_USE_XINPUT22 + bool startSystemMoveResizeForTouchBegin(xcb_window_t window, const QPoint &point, int corner); + void abortSystemMoveResizeForTouch(); + bool isTouchScreen(int id); +#endif -+#endif -+ QXcbEventReader *eventReader() const { return m_reader; } + + bool canGrab() const { return m_canGrabServer; } + -+ QXcbGlIntegration *glIntegration() const { return m_glIntegration; } ++ QXcbGlIntegration *glIntegration() const; ++ ++ void flush() { xcb_flush(xcb_connection()); } ++ void processXcbEvents(QEventLoop::ProcessEventsFlags flags); ++ ++ QTimer &focusInTimer() { return m_focusInTimer; } + +protected: + bool event(QEvent *e) override; + -+public slots: -+ void flush() { xcb_flush(m_connection); } -+ -+private slots: -+ void processXcbEvents(); -+ +private: -+ void initializeAllAtoms(); -+ void sendConnectionEvent(QXcbAtom::Atom atom, uint id = 0); -+ void initializeShm(); -+ void initializeXFixes(); -+ void initializeXRender(); -+ void initializeXRandr(); -+ void initializeXinerama(); -+ void initializeXShape(); -+ void initializeXKB(); -+ void handleClientMessageEvent(const xcb_client_message_event_t *event); ++ void xrandrSelectEvents(); + QXcbScreen* findScreenForCrtc(xcb_window_t rootWindow, xcb_randr_crtc_t crtc) const; + QXcbScreen* findScreenForOutput(xcb_window_t rootWindow, xcb_randr_output_t output) const; + QXcbVirtualDesktop* virtualDesktopForRootWindow(xcb_window_t rootWindow) const; @@ -799,12 +804,11 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + xcb_randr_get_output_info_reply_t *outputInfo); + void destroyScreen(QXcbScreen *screen); + void initializeScreens(); -+ bool compressEvent(xcb_generic_event_t *event, int currentIndex, QXcbEventArray *eventqueue) const; ++ bool compressEvent(xcb_generic_event_t *event) const; ++ inline bool timeGreaterThan(xcb_timestamp_t a, xcb_timestamp_t b) const ++ { return static_cast(a - b) > 0 || b == XCB_CURRENT_TIME; } + -+ bool m_xi2Enabled = false; -+#if QT_CONFIG(xinput2) -+ int m_xi2Minor = -1; -+ void initializeXInput2(); ++#if QT_CONFIG(xcb_xinput) + void xi2SetupDevice(void *info, bool removeExisting = true); + void xi2SetupDevices(); + struct TouchDeviceData { @@ -830,10 +834,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + void xi2HandleEvent(xcb_ge_event_t *event); + void xi2HandleHierarchyEvent(void *event); + void xi2HandleDeviceChangedEvent(void *event); -+ int m_xiOpCode, m_xiEventBase, m_xiErrorBase; -+#ifdef XCB_USE_XINPUT22 + void xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindow); -+#endif // XCB_USE_XINPUT22 +#if QT_CONFIG(tabletevent) + struct TabletData { + int deviceId = 0; @@ -868,32 +869,30 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QPointF lastScrollPosition; + }; + QHash m_scrollingDevices; -+#ifdef XCB_USE_XINPUT21 + void xi2HandleScrollEvent(void *event, ScrollingDevice &scrollingDevice); + void xi2UpdateScrollingDevice(ScrollingDevice &scrollingDevice); + ScrollingDevice *scrollingDeviceForId(int id); -+#endif + + static bool xi2GetValuatorValueIfSet(const void *event, int valuatorNum, double *value); -+ static void xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *event); -+#endif + -+ xcb_connection_t *m_connection = nullptr; -+ const xcb_setup_t *m_setup = nullptr; ++ QHash m_touchDevices; ++ struct StartSystemMoveResizeInfo { ++ xcb_window_t window = XCB_NONE; ++ uint16_t deviceid; ++ uint32_t pointid; ++ int corner; ++ } m_startSystemMoveResizeInfo; ++#endif // QT_CONFIG(xcb_xinput) ++ + const bool m_canGrabServer; + const xcb_visualid_t m_defaultVisualId; + + QList m_virtualDesktops; + QList m_screens; -+ int m_primaryScreenNumber = 0; -+ -+ xcb_atom_t m_allAtoms[QXcbAtom::NAtoms]; + + xcb_timestamp_t m_time = XCB_CURRENT_TIME; + xcb_timestamp_t m_netWmUserTime = XCB_CURRENT_TIME; + -+ QByteArray m_displayName; -+ + QXcbKeyboard *m_keyboard = nullptr; +#ifndef QT_NO_CLIPBOARD + QXcbClipboard *m_clipboard = nullptr; @@ -904,42 +903,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QScopedPointer m_wmSupport; + QXcbNativeInterface *m_nativeInterface = nullptr; + -+#if QT_CONFIG(xcb_xlib) -+ void *m_xlib_display = nullptr; -+#endif -+ QXcbEventReader *m_reader = nullptr; ++ QXcbEventQueue *m_eventQueue = nullptr; + -+#if QT_CONFIG(xinput2) -+ QHash m_touchDevices; -+#ifdef XCB_USE_XINPUT22 -+ struct StartSystemMoveResizeInfo { -+ xcb_window_t window = XCB_NONE; -+ uint16_t deviceid; -+ uint32_t pointid; -+ int corner; -+ } m_startSystemMoveResizeInfo; -+#endif -+#endif + WindowMapper m_mapper; + -+ QVector m_peekFuncs; -+ -+ uint32_t xfixes_first_event = 0; -+ uint32_t xrandr_first_event = 0; -+ uint32_t xkb_first_event = 0; -+ -+ bool has_xfixes = false; -+ bool has_xinerama_extension = false; -+ bool has_shape_extension = false; -+ bool has_randr_extension = false; -+ bool has_input_shape; -+ bool has_xkb = false; -+ bool has_render_extension = false; -+ bool has_shm = false; -+ bool has_shm_fd = false; -+ -+ QPair m_xrenderVersion; -+ + Qt::MouseButtons m_buttonState = 0; + Qt::MouseButton m_button = Qt::NoButton; + @@ -950,44 +917,26 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + xcb_window_t m_clientLeader = 0; + QByteArray m_startupId; + QXcbSystemTrayTracker *m_systemTrayTracker = nullptr; -+ QXcbGlIntegration *m_glIntegration = nullptr; ++ mutable QXcbGlIntegration *m_glIntegration = nullptr; ++ mutable bool m_glIntegrationInitialized = false; + bool m_xiGrab = false; + QVector m_xiMasterPointerIds; + + xcb_window_t m_qtSelectionOwner = 0; + -+ bool m_mainEventLoopFlushedQueue = false; -+ qint32 m_peekerIdSource = 0; -+ bool m_peekerIndexCacheDirty = false; -+ QHash m_peekerToCachedIndex; -+ friend class QXcbEventReader; ++ friend class QXcbEventQueue; + + QByteArray m_xdgCurrentDesktop; ++ QTimer m_focusInTimer; ++ +}; -+#if QT_CONFIG(xinput2) ++#if QT_CONFIG(xcb_xinput) +#if QT_CONFIG(tabletevent) +Q_DECLARE_TYPEINFO(QXcbConnection::TabletData::ValuatorClassInfo, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(QXcbConnection::TabletData, Q_MOVABLE_TYPE); +#endif +#endif + -+template -+xcb_generic_event_t *QXcbConnection::checkEvent(T &checker) -+{ -+ QXcbEventArray *eventqueue = m_reader->lock(); -+ -+ for (int i = 0; i < eventqueue->size(); ++i) { -+ xcb_generic_event_t *event = eventqueue->at(i); -+ if (checker.checkEvent(event)) { -+ (*eventqueue)[i] = 0; -+ m_reader->unlock(); -+ return event; -+ } -+ } -+ m_reader->unlock(); -+ return 0; -+} -+ +class QXcbConnectionGrabber +{ +public: @@ -998,6 +947,181 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QXcbConnection *m_connection; +}; + ++// The xcb_send_event() requires all events to have 32 bytes. It calls memcpy() on the ++// passed in event. If the passed in event is less than 32 bytes, memcpy() reaches into ++// unrelated memory. ++template ++struct alignas(32) q_padded_xcb_event : T { }; ++ ++QT_END_NAMESPACE ++ ++#endif +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection_basic.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection_basic.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection_basic.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbconnection_basic.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,181 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2018 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the QtCore module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** 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. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++#ifndef QXCBBASICCONNECTION_H ++#define QXCBBASICCONNECTION_H ++ ++#include "qxcbatom.h" ++#include "qxcbexport.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++Q_DECLARE_LOGGING_CATEGORY(lcQpaXcb) ++ ++class Q_XCB_EXPORT QXcbBasicConnection : public QObject ++{ ++ Q_OBJECT ++public: ++ QXcbBasicConnection(const char *displayName); ++ ~QXcbBasicConnection(); ++ ++#if QT_CONFIG(xcb_xlib) ++ void *xlib_display() const { return m_xlibDisplay; } ++#endif ++ const char *displayName() const { return m_displayName.constData(); } ++ int primaryScreenNumber() const { return m_primaryScreenNumber; } ++ xcb_connection_t *xcb_connection() const { return m_xcbConnection; } ++ bool isConnected() const { ++ return m_xcbConnection && !xcb_connection_has_error(m_xcbConnection); ++ } ++ const xcb_setup_t *setup() const { return m_setup; } ++ ++ size_t maxRequestDataBytes(size_t requestSize) const; ++ ++ inline xcb_atom_t atom(QXcbAtom::Atom qatom) const { return m_xcbAtom.atom(qatom); } ++ QXcbAtom::Atom qatom(xcb_atom_t atom) const { return m_xcbAtom.qatom(atom); } ++ xcb_atom_t internAtom(const char *name); ++ QByteArray atomName(xcb_atom_t atom); ++ ++ bool hasXFixes() const { return m_hasXFixes; } ++ bool hasXShape() const { return m_hasXhape; } ++ bool hasXRandr() const { return m_hasXRandr; } ++ bool hasInputShape() const { return m_hasInputShape; } ++ bool hasXKB() const { return m_hasXkb; } ++ bool hasXRender(int major = -1, int minor = -1) const { ++ if (m_hasXRender && major != -1 && minor != -1) ++ return m_xrenderVersion >= qMakePair(major, minor); ++ ++ return m_hasXRender; ++ } ++ bool hasXInput2() const { return m_xi2Enabled; } ++ bool hasShm() const { return m_hasShm; } ++ bool hasShmFd() const { return m_hasShmFd; } ++ bool hasXSync() const { return m_hasXSync; } ++ bool hasXinerama() const { return m_hasXinerama; } ++ bool hasBigRequest() const; ++ ++#if QT_CONFIG(xcb_xinput) ++ bool isAtLeastXI21() const { return m_xi2Enabled && m_xi2Minor >= 1; } ++ bool isAtLeastXI22() const { return m_xi2Enabled && m_xi2Minor >= 2; } ++ bool isXIEvent(xcb_generic_event_t *event) const; ++ bool isXIType(xcb_generic_event_t *event, uint16_t type) const; ++#endif ++ ++ bool isXFixesType(uint responseType, int eventType) const; ++ bool isXRandrType(uint responseType, int eventType) const; ++ bool isXkbType(uint responseType) const; // https://bugs.freedesktop.org/show_bug.cgi?id=51295 ++ ++protected: ++ void initializeShm(); ++ void initializeXFixes(); ++ void initializeXRender(); ++ void initializeXRandr(); ++ void initializeXinerama(); ++ void initializeXShape(); ++ void initializeXKB(); ++ void initializeXSync(); ++#if QT_CONFIG(xcb_xinput) ++ void initializeXInput2(); ++#endif ++ ++private: ++#if QT_CONFIG(xcb_xlib) ++ void *m_xlibDisplay = nullptr; ++#endif ++ QByteArray m_displayName; ++ xcb_connection_t *m_xcbConnection = nullptr; ++ int m_primaryScreenNumber = 0; ++ const xcb_setup_t *m_setup = nullptr; ++ QXcbAtom m_xcbAtom; ++ ++ bool m_hasXFixes = false; ++ bool m_hasXinerama = false; ++ bool m_hasXhape = false; ++ bool m_hasInputShape; ++ bool m_hasXRandr = false; ++ bool m_hasXkb = false; ++ bool m_hasXRender = false; ++ bool m_hasShm = false; ++ bool m_hasShmFd = false; ++ bool m_hasXSync = false; ++ ++ QPair m_xrenderVersion; ++ ++ bool m_xi2Enabled = false; ++#if QT_CONFIG(xcb_xinput) ++ int m_xi2Minor = -1; ++ int m_xiOpCode = -1; ++ uint32_t m_xinputFirstEvent = 0; ++#endif ++ ++ uint32_t m_xfixesFirstEvent = 0; ++ uint32_t m_xrandrFirstEvent = 0; ++ uint32_t m_xkbFirstEvent = 0; ++ ++ uint32_t m_maximumRequestLength = 0; ++}; ++ +#define Q_XCB_REPLY_CONNECTION_ARG(connection, ...) connection + +struct QStdFreeDeleter { @@ -1014,25 +1138,12 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + call##_reply(Q_XCB_REPLY_CONNECTION_ARG(__VA_ARGS__), call##_unchecked(__VA_ARGS__), nullptr) \ + ) + -+template -+union q_padded_xcb_event { -+ T event; -+ char padding[32]; -+}; -+ -+// The xcb_send_event() requires all events to have 32 bytes. It calls memcpy() on the -+// passed in event. If the passed in event is less than 32 bytes, memcpy() reaches into -+// unrelated memory. -+#define Q_DECLARE_XCB_EVENT(event_var, event_type) \ -+ q_padded_xcb_event store = {}; \ -+ auto &event_var = store.event; -+ +QT_END_NAMESPACE + -+#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbcursor.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbcursor.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbcursor.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbcursor.h 2018-12-15 11:51:30.627161826 +0100 ++#endif // QXCBBASICCONNECTION_H +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbcursor.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbcursor.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbcursor.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbcursor.h 2019-07-12 20:19:55.902986508 +0000 @@ -0,0 +1,129 @@ +/**************************************************************************** +** @@ -1163,10 +1274,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbdrag.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbdrag.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbdrag.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbdrag.h 2018-12-15 11:51:30.627161826 +0100 -@@ -0,0 +1,178 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbdrag.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbdrag.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbdrag.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbdrag.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,185 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. @@ -1247,14 +1358,15 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + void startDrag() override; + void cancel() override; -+ void move(const QPoint &globalPos) override; -+ void drop(const QPoint &globalPos) override; ++ void move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override; ++ void drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override; + void endDrag() override; + + void handleEnter(QPlatformWindow *window, const xcb_client_message_event_t *event, xcb_window_t proxy = 0); + void handlePosition(QPlatformWindow *w, const xcb_client_message_event_t *event); + void handleLeave(QPlatformWindow *w, const xcb_client_message_event_t *event); -+ void handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event); ++ void handleDrop(QPlatformWindow *, const xcb_client_message_event_t *event, ++ Qt::MouseButtons b = 0, Qt::KeyboardModifiers mods = 0); + + void handleStatus(const xcb_client_message_event_t *event); + void handleSelectionRequest(const xcb_selection_request_event_t *event); @@ -1269,12 +1381,15 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +protected: + void timerEvent(QTimerEvent* e) override; + ++ bool findXdndAwareTarget(const QPoint &globalPos, xcb_window_t *target_out); ++ +private: + friend class QXcbDropData; + + void init(); + -+ void handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *event); ++ void handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *event, ++ Qt::MouseButtons b = 0, Qt::KeyboardModifiers mods = 0); + void handle_xdnd_status(const xcb_client_message_event_t *event); + void send_leave(); + @@ -1308,6 +1423,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + bool dropped; + bool canceled; + ++ // A window from Unity DnD Manager, which does not respect the XDnD spec ++ xcb_window_t xdndCollectionWindow = XCB_NONE; ++ + // top-level window we sent position to last. + xcb_window_t current_target; + // window to send events to (always valid if current_target) @@ -1345,9 +1463,300 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbexport.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbexport.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbexport.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbexport.h 2018-12-15 11:51:30.627161826 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventdispatcher.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventdispatcher.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventdispatcher.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventdispatcher.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,114 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2018 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the QtCore module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** 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. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++#ifndef QXCBEVENTDISPATCHER_H ++#define QXCBEVENTDISPATCHER_H ++ ++#include ++#include ++ ++#include ++#if QT_CONFIG(glib) ++#include ++#include ++#endif ++ ++QT_BEGIN_NAMESPACE ++ ++class QXcbConnection; ++ ++class QXcbUnixEventDispatcher : public QEventDispatcherUNIX ++{ ++ Q_OBJECT ++public: ++ explicit QXcbUnixEventDispatcher(QXcbConnection *connection, QObject *parent = nullptr); ++ ~QXcbUnixEventDispatcher(); ++ bool processEvents(QEventLoop::ProcessEventsFlags flags) override; ++ ++ // Maybe some user code depends on deprecated QUnixEventDispatcherQPA:: ++ // hasPendingEvents() / flush() implementation, so keep it around until ++ // Qt 6. These methods are deprecated in QAbstractEventDispatcher. ++ bool hasPendingEvents() override; // ### Qt 6 remove ++ void flush() override; // ### Qt 6 remove ++ ++private: ++ QXcbConnection *m_connection; ++}; ++ ++#if QT_CONFIG(glib) ++ ++struct XcbEventSource; ++class QXcbGlibEventDispatcherPrivate; ++ ++class QXcbGlibEventDispatcher : public QEventDispatcherGlib ++{ ++ Q_OBJECT ++ Q_DECLARE_PRIVATE(QXcbGlibEventDispatcher) ++ ++public: ++ explicit QXcbGlibEventDispatcher(QXcbConnection *connection, QObject *parent = nullptr); ++ ~QXcbGlibEventDispatcher(); ++ ++ bool processEvents(QEventLoop::ProcessEventsFlags flags) override; ++ QEventLoop::ProcessEventsFlags flags() const { return m_flags; } ++ ++private: ++ XcbEventSource *m_xcbEventSource; ++ GSourceFuncs m_xcbEventSourceFuncs; ++ QEventLoop::ProcessEventsFlags m_flags; ++}; ++ ++class QXcbGlibEventDispatcherPrivate : public QEventDispatcherGlibPrivate ++{ ++ Q_DECLARE_PUBLIC(QXcbGlibEventDispatcher) ++ ++public: ++ QXcbGlibEventDispatcherPrivate(); ++}; ++ ++#endif // QT_CONFIG(glib) ++ ++class QXcbEventDispatcher ++{ ++public: ++ static QAbstractEventDispatcher *createEventDispatcher(QXcbConnection *connection); ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QXCBEVENTDISPATCHER_H +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventqueue.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventqueue.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventqueue.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbeventqueue.h 2019-07-12 20:19:55.902986508 +0000 +@@ -0,0 +1,169 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2018 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the QtCore module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** 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. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++#ifndef QXCBEVENTQUEUE_H ++#define QXCBEVENTQUEUE_H ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++struct QXcbEventNode { ++ QXcbEventNode(xcb_generic_event_t *e = nullptr) ++ : event(e) { } ++ ++ xcb_generic_event_t *event; ++ QXcbEventNode *next = nullptr; ++ bool fromHeap = false; ++}; ++ ++class QXcbConnection; ++class QAbstractEventDispatcher; ++ ++class QXcbEventQueue : public QThread ++{ ++ Q_OBJECT ++public: ++ QXcbEventQueue(QXcbConnection *connection); ++ ~QXcbEventQueue(); ++ ++ enum { PoolSize = 100 }; // 2.4 kB with 100 nodes ++ ++ enum PeekOption { ++ PeekDefault = 0, // see qx11info_x11.h for docs ++ PeekFromCachedIndex = 1, ++ PeekRetainMatch = 2, ++ PeekRemoveMatch = 3, ++ PeekRemoveMatchContinue = 4 ++ }; ++ Q_DECLARE_FLAGS(PeekOptions, PeekOption) ++ ++ void run() override; ++ ++ bool isEmpty() const { return m_head == m_flushedTail && !m_head->event; } ++ xcb_generic_event_t *takeFirst(QEventLoop::ProcessEventsFlags flags); ++ xcb_generic_event_t *takeFirst(); ++ void flushBufferedEvents(); ++ void wakeUpDispatcher(); ++ ++ // ### peek() and peekEventQueue() could be unified. Note that peekEventQueue() ++ // is public API exposed via QX11Extras/QX11Info. ++ template ++ xcb_generic_event_t *peek(Peeker &&peeker) { ++ return peek(PeekRemoveMatch, std::forward(peeker)); ++ } ++ template ++ inline xcb_generic_event_t *peek(PeekOption config, Peeker &&peeker); ++ ++ qint32 generatePeekerId(); ++ bool removePeekerId(qint32 peekerId); ++ ++ using PeekerCallback = bool (*)(xcb_generic_event_t *event, void *peekerData); ++ bool peekEventQueue(PeekerCallback peeker, void *peekerData = nullptr, ++ PeekOptions option = PeekDefault, qint32 peekerId = -1); ++ ++ void waitForNewEvents(unsigned long time = ULONG_MAX); ++ ++private: ++ QXcbEventNode *qXcbEventNodeFactory(xcb_generic_event_t *event); ++ void dequeueNode(); ++ ++ void sendCloseConnectionEvent() const; ++ bool isCloseConnectionEvent(const xcb_generic_event_t *event); ++ ++ QXcbEventNode *m_head = nullptr; ++ QXcbEventNode *m_flushedTail = nullptr; ++ std::atomic m_tail { nullptr }; ++ std::atomic_uint m_nodesRestored { 0 }; ++ ++ QXcbConnection *m_connection = nullptr; ++ bool m_closeConnectionDetected = false; ++ ++ uint m_freeNodes = PoolSize; ++ uint m_poolIndex = 0; ++ ++ qint32 m_peekerIdSource = 0; ++ bool m_queueModified = false; ++ bool m_peekerIndexCacheDirty = false; ++ QHash m_peekerToNode; ++ ++ QVector m_inputEvents; ++ ++ // debug stats ++ quint64 m_nodesOnHeap = 0; ++ ++ QMutex m_newEventsMutex; ++ QWaitCondition m_newEventsCondition; ++}; ++ ++template ++xcb_generic_event_t *QXcbEventQueue::peek(PeekOption option, Peeker &&peeker) ++{ ++ flushBufferedEvents(); ++ if (isEmpty()) ++ return nullptr; ++ ++ QXcbEventNode *node = m_head; ++ do { ++ xcb_generic_event_t *event = node->event; ++ if (event && peeker(event, event->response_type & ~0x80)) { ++ if (option == PeekRemoveMatch || option == PeekRemoveMatchContinue) ++ node->event = nullptr; ++ if (option != PeekRemoveMatchContinue) ++ return event; ++ } ++ if (node == m_flushedTail) ++ break; ++ node = node->next; ++ } while (true); ++ ++ return nullptr; ++} ++ ++QT_END_NAMESPACE ++ ++#endif +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbexport.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbexport.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbexport.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbexport.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,55 @@ +/**************************************************************************** +** @@ -1404,9 +1813,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE +#endif //QXCBEXPORT_H + -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbimage.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbimage.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbimage.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbimage.h 2018-12-15 11:51:30.628161836 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbimage.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbimage.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbimage.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbimage.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,62 @@ +/**************************************************************************** +** @@ -1470,10 +1879,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbintegration.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbintegration.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbintegration.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbintegration.h 2018-12-15 11:51:30.628161836 +0100 -@@ -0,0 +1,152 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbintegration.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbintegration.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbintegration.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbintegration.h 2019-07-12 20:19:55.903986508 +0000 +@@ -0,0 +1,150 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. @@ -1529,7 +1938,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +class QXcbConnection; +class QAbstractEventDispatcher; +class QXcbNativeInterface; -+class QXcbScreen; + +class Q_XCB_EXPORT QXcbIntegration : public QPlatformIntegration +{ @@ -1579,6 +1987,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QPlatformTheme *createPlatformTheme(const QString &name) const override; + QVariant styleHint(StyleHint hint) const override; + ++ bool hasDefaultConnection() const { return !m_connections.isEmpty(); } + QXcbConnection *defaultConnection() const { return m_connections.first(); } + + QByteArray wmClass() const; @@ -1613,8 +2022,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + QScopedPointer m_services; + -+ friend class QXcbConnection; // access QPlatformIntegration::screenAdded() -+ + mutable QByteArray m_wmClass; + const char *m_instanceName; + bool m_canGrab; @@ -1626,10 +2033,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbkeyboard.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbkeyboard.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbkeyboard.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbkeyboard.h 2018-12-15 11:51:30.628161836 +0100 -@@ -0,0 +1,163 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbkeyboard.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbkeyboard.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbkeyboard.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbkeyboard.h 2019-07-12 20:19:55.903986508 +0000 +@@ -0,0 +1,151 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. @@ -1675,18 +2082,19 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +#include "qxcbobject.h" + +#include ++#if QT_CONFIG(xkb) ++#define explicit dont_use_cxx_explicit ++#include ++#undef explicit ++#endif + +#include -+#if QT_CONFIG(xkb) -+#include -+#endif ++#include + +#include + +QT_BEGIN_NAMESPACE + -+class QWindow; -+ +class QXcbKeyboard : public QXcbObject +{ +public: @@ -1694,19 +2102,22 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + ~QXcbKeyboard(); + ++ void initialize(); ++ void selectEvents(); ++ + void handleKeyPressEvent(const xcb_key_press_event_t *event); + void handleKeyReleaseEvent(const xcb_key_release_event_t *event); + + Qt::KeyboardModifiers translateModifiers(int s) const; + void updateKeymap(xcb_mapping_notify_event_t *event); + void updateKeymap(); -+ QList possibleKeys(const QKeyEvent *e) const; ++ QList possibleKeys(const QKeyEvent *event) const; + + // when XKEYBOARD not present on the X server + void updateXKBMods(); + xkb_mod_mask_t xkbModMask(quint16 state); + void updateXKBStateFromCore(quint16 state); -+#if QT_CONFIG(xinput2) ++#if QT_CONFIG(xcb_xinput) + void updateXKBStateFromXI(void *modInfo, void *groupInfo); +#endif +#if QT_CONFIG(xkb) @@ -1721,10 +2132,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + quint16 state, xcb_timestamp_t time, bool fromSendEvent); + + void resolveMaskConflicts(); -+ QString lookupString(struct xkb_state *state, xcb_keycode_t code) const; -+ QString lookupStringNoKeysymTransformations(xkb_keysym_t keysym) const; -+ int keysymToQtKey(xcb_keysym_t keysym, Qt::KeyboardModifiers modifiers, -+ struct xkb_state *state, xcb_keycode_t code) const; + + typedef QMap KeysymModifierMap; + struct xkb_keymap *keymapFromCore(const KeysymModifierMap &keysymMods); @@ -1736,12 +2143,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + void updateVModMapping(); + void updateVModToRModMapping(); + -+ xkb_keysym_t lookupLatinKeysym(xkb_keycode_t keycode) const; -+ void checkForLatinLayout() const; -+ +private: + bool m_config = false; -+ xcb_keycode_t m_autorepeat_code = 0; ++ bool m_isAutoRepeat = false; ++ xcb_keycode_t m_autoRepeatCode = 0; + + struct _mod_masks { + uint alt; @@ -1772,30 +2177,20 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + int core_device_id; +#endif + -+ struct XKBStateDeleter { -+ void operator()(struct xkb_state *state) const { return xkb_state_unref(state); } -+ }; -+ struct XKBKeymapDeleter { -+ void operator()(struct xkb_keymap *keymap) const { return xkb_keymap_unref(keymap); } -+ }; -+ struct XKBContextDeleter { -+ void operator()(struct xkb_context *context) const { return xkb_context_unref(context); } -+ }; -+ using ScopedXKBState = std::unique_ptr; -+ using ScopedXKBKeymap = std::unique_ptr; -+ using ScopedXKBContext = std::unique_ptr; ++ QXkbCommon::ScopedXKBState m_xkbState; ++ QXkbCommon::ScopedXKBKeymap m_xkbKeymap; ++ QXkbCommon::ScopedXKBContext m_xkbContext; + -+ ScopedXKBState m_xkbState; -+ ScopedXKBKeymap m_xkbKeymap; -+ ScopedXKBContext m_xkbContext; ++ bool m_superAsMeta = false; ++ bool m_hyperAsMeta = false; +}; + +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbmime.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbmime.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbmime.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbmime.h 2018-12-15 11:51:30.628161836 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbmime.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbmime.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbmime.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbmime.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,70 @@ +/**************************************************************************** +** @@ -1867,10 +2262,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif // QXCBMIME_H -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbnativeinterface.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbnativeinterface.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbnativeinterface.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbnativeinterface.h 2018-12-15 11:51:30.628161836 +0100 -@@ -0,0 +1,163 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbnativeinterface.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbnativeinterface.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbnativeinterface.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbnativeinterface.h 2019-07-12 20:19:55.903986508 +0000 +@@ -0,0 +1,156 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. @@ -1971,7 +2366,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + QFunctionPointer platformFunction(const QByteArray &function) const override; + -+ inline const QByteArray &genericEventFilterType() const { return m_genericEventFilterType; } ++ inline const QByteArray &nativeEventType() const { return m_nativeEventType; } + + void *displayForWindow(QWindow *window); + void *connectionForWindow(QWindow *window); @@ -1991,15 +2386,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + static qint32 generatePeekerId(); + static bool removePeekerId(qint32 peekerId); -+ static bool peekEventQueue(QXcbConnection::PeekerCallback peeker, void *peekerData = nullptr, -+ QXcbConnection::PeekOptions option = QXcbConnection::PeekDefault, ++ static bool peekEventQueue(QXcbEventQueue::PeekerCallback peeker, void *peekerData = nullptr, ++ QXcbEventQueue::PeekOptions option = QXcbEventQueue::PeekDefault, + qint32 peekerId = -1); + -+ Q_INVOKABLE bool systemTrayAvailable(const QScreen *screen) const; -+ Q_INVOKABLE void setParentRelativeBackPixmap(QWindow *window); -+ Q_INVOKABLE bool systrayVisualHasAlphaChannel(); -+ Q_INVOKABLE bool requestSystemTrayWindowDock(const QWindow *window); -+ Q_INVOKABLE QRect systemTrayWindowGlobalGeometry(const QWindow *window); + Q_INVOKABLE QString dumpConnectionNativeWindows(const QXcbConnection *connection, WId root) const; + Q_INVOKABLE QString dumpNativeWindows(WId root = 0) const; + @@ -2009,9 +2399,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + void systemTrayWindowChanged(QScreen *screen); + +private: -+ xcb_window_t locateSystemTray(xcb_connection_t *conn, const QXcbScreen *screen); -+ -+ const QByteArray m_genericEventFilterType; ++ const QByteArray m_nativeEventType = QByteArrayLiteral("xcb_generic_event_t"); + + xcb_atom_t m_sysTraySelectionAtom = XCB_ATOM_NONE; + @@ -2034,9 +2422,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif // QXCBNATIVEINTERFACE_H -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbobject.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbobject.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbobject.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbobject.h 2018-12-15 11:51:30.629161845 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbobject.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbobject.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbobject.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbobject.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,64 @@ +/**************************************************************************** +** @@ -2102,10 +2490,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbscreen.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbscreen.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbscreen.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbscreen.h 2018-12-15 11:51:30.629161845 +0100 -@@ -0,0 +1,243 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbscreen.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbscreen.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbscreen.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbscreen.h 2019-07-12 20:19:55.903986508 +0000 +@@ -0,0 +1,239 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. @@ -2187,7 +2575,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QXcbScreen *screenAt(const QPoint &pos) const; + + QList screens() const { return m_screens; } -+ void setScreens(QList sl) { m_screens = sl; } ++ void setScreens(QList &&sl) { m_screens = std::move(sl); } + void removeScreen(QPlatformScreen *s) { m_screens.removeOne(s); } + void addScreen(QPlatformScreen *s); + void setPrimaryScreen(QPlatformScreen *s); @@ -2210,7 +2598,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + int antialiasingEnabled() const { return m_antialiasingEnabled; } + + QString windowManagerName() const { return m_windowManagerName; } -+ bool syncRequestSupported() const { return m_syncRequestSupported; } + + QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &format) const; + @@ -2241,10 +2628,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QFontEngine::SubpixelAntialiasingType m_subpixelType = QFontEngine::SubpixelAntialiasingType(-1); + int m_antialiasingEnabled = -1; + QString m_windowManagerName; -+ bool m_syncRequestSupported = false; + QMap m_visuals; + QMap m_visualDepths; -+ uint16_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0; ++ uint16_t m_rotation = 0; +}; + +class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen @@ -2296,7 +2682,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + void windowShown(QXcbWindow *window); + QString windowManagerName() const { return m_virtualDesktop->windowManagerName(); } -+ bool syncRequestSupported() const { return m_virtualDesktop->syncRequestSupported(); } + + QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &format) const; + @@ -2328,7 +2713,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + xcb_randr_crtc_t m_crtc; + xcb_randr_mode_t m_mode = XCB_NONE; + bool m_primary = false; -+ uint8_t m_rotation = 0; + + QString m_outputName; + QSizeF m_outputSizeMillimeters; @@ -2349,10 +2733,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsessionmanager.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsessionmanager.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsessionmanager.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsessionmanager.h 2018-12-15 11:51:30.629161845 +0100 -@@ -0,0 +1,96 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsessionmanager.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsessionmanager.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsessionmanager.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsessionmanager.h 2019-07-12 20:19:55.903986508 +0000 +@@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Teo Mrnjavac @@ -2440,8 +2824,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + +private: + QEventLoop *m_eventLoop; -+ -+ Q_DISABLE_COPY(QXcbSessionManager) +}; + +QT_END_NAMESPACE @@ -2449,9 +2831,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +#endif //QT_NO_SESSIONMANAGER + +#endif //QXCBSESSIONMANAGER_H -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsystemtraytracker.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsystemtraytracker.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsystemtraytracker.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbsystemtraytracker.h 2018-12-15 11:51:30.629161845 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsystemtraytracker.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsystemtraytracker.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsystemtraytracker.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbsystemtraytracker.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,85 @@ +/**************************************************************************** +** @@ -2512,13 +2894,12 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + xcb_window_t trayWindow(); + void requestSystemTrayWindowDock(xcb_window_t window) const; -+ QRect systemTrayWindowGlobalGeometry(xcb_window_t window) const; + + void notifyManagerClientMessageEvent(const xcb_client_message_event_t *); + + void handleDestroyNotifyEvent(const xcb_destroy_notify_event_t *) override; + -+ bool visualHasAlphaChannel(); ++ xcb_visualid_t visualId(); +signals: + void systemTrayWindowChanged(QScreen *screen); + @@ -2528,6 +2909,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + xcb_atom_t selection); + static xcb_window_t locateTrayWindow(const QXcbConnection *connection, xcb_atom_t selection); + void emitSystemTrayWindowChanged(); ++ xcb_visualid_t netSystemTrayVisual(); + + const xcb_atom_t m_selection; + const xcb_atom_t m_trayAtom; @@ -2538,10 +2920,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif // QXCBSYSTEMTRAYTRACKER_H -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkaninstance.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkaninstance.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkaninstance.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkaninstance.h 2018-12-15 11:51:30.630161854 +0100 -@@ -0,0 +1,79 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkaninstance.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkaninstance.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkaninstance.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkaninstance.h 2019-07-12 20:19:55.903986508 +0000 +@@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. @@ -2608,22 +2990,19 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + void presentQueued(QWindow *window) override; + + VkSurfaceKHR createSurface(QXcbWindow *window); -+ void destroySurface(VkSurfaceKHR surface); + +private: + QVulkanInstance *m_instance; -+ QLibrary m_lib; + PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR m_getPhysDevPresSupport; + PFN_vkCreateXcbSurfaceKHR m_createSurface; -+ PFN_vkDestroySurfaceKHR m_destroySurface; +}; + +QT_END_NAMESPACE + +#endif // QXCBVULKANINSTANCE_H -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkanwindow.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkanwindow.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkanwindow.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbvulkanwindow.h 2018-12-15 11:51:30.630161854 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkanwindow.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkanwindow.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkanwindow.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbvulkanwindow.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,65 @@ +/**************************************************************************** +** @@ -2690,10 +3069,10 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif // QXCBVULKANWINDOW_H -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwindow.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwindow.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwindow.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwindow.h 2018-12-15 11:51:30.630161854 +0100 -@@ -0,0 +1,306 @@ +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwindow.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwindow.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwindow.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwindow.h 2019-07-12 20:19:55.903986508 +0000 +@@ -0,0 +1,299 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. @@ -2801,7 +3180,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + QSurfaceFormat format() const override; + -+ void windowEvent(QEvent *event) override; ++ bool windowEvent(QEvent *event) override; + + bool startSystemResize(const QPoint &pos, Qt::Corner corner) override; + bool startSystemMove(const QPoint &pos) override; @@ -2817,7 +3196,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + QImage::Format imageFormat() const { return m_imageFormat; } + bool imageNeedsRgbSwap() const { return m_imageRgbSwap; } + -+ bool handleGenericEvent(xcb_generic_event_t *event, long *result) override; ++ bool handleNativeEvent(xcb_generic_event_t *event) override; + + void handleExposeEvent(const xcb_expose_event_t *event) override; + void handleClientMessageEvent(const xcb_client_message_event_t *event) override; @@ -2833,7 +3212,7 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + void handleFocusInEvent(const xcb_focus_in_event_t *event) override; + void handleFocusOutEvent(const xcb_focus_out_event_t *event) override; + void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) override; -+#if QT_CONFIG(xinput2) ++#if QT_CONFIG(xcb_xinput) + void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized) override; + void handleXIEnterLeave(xcb_ge_event_t *) override; +#endif @@ -2855,14 +3234,8 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + static void setWindowIconTextStatic(QWindow *window, const QString &text); + -+ static void setParentRelativeBackPixmapStatic(QWindow *window); + void setParentRelativeBackPixmap(); -+ -+ static bool requestSystemTrayWindowDockStatic(const QWindow *window); -+ bool requestSystemTrayWindowDock() const; -+ -+ static QRect systemTrayWindowGlobalGeometryStatic(const QWindow *window); -+ QRect systemTrayWindowGlobalGeometry() const; ++ bool requestSystemTrayWindowDock(); + uint visualId() const; + + bool needsSync() const; @@ -2875,9 +3248,15 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + bool startSystemMoveResize(const QPoint &pos, int corner); + void doStartSystemMoveResize(const QPoint &globalPos, int corner); + ++ static bool isTrayIconWindow(QWindow *window) ++ { ++ return window->objectName() == QLatin1String("QSystemTrayIconSysWindow"); ++ } ++ + virtual void create(); + virtual void destroy(); + ++ static void setWindowTitle(const QXcbConnection *conn, xcb_window_t window, const QString &title); + static QString windowTitle(const QXcbConnection *conn, xcb_window_t window); + +public Q_SLOTS: @@ -2889,22 +3268,19 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + void setImageFormatForVisual(const xcb_visualtype_t *visual); + + QXcbScreen *parentScreen(); -+ + QXcbScreen *initialScreen() const; -+ void changeNetWmState(bool set, xcb_atom_t one, xcb_atom_t two = 0); ++ ++ void setNetWmState(bool set, xcb_atom_t one, xcb_atom_t two = 0); ++ void setNetWmState(Qt::WindowFlags flags); ++ void setNetWmState(Qt::WindowStates state); ++ void setNetWmStateOnUnmappedWindow(); + NetWmStates netWmStates(); -+ void setNetWmStates(NetWmStates); + -+ void setMotifWindowFlags(Qt::WindowFlags flags); -+ void setNetWmStateWindowFlags(Qt::WindowFlags flags); -+ -+ void updateMotifWmHintsBeforeMap(); -+ void updateNetWmStateBeforeMap(); ++ void setMotifWmHints(Qt::WindowFlags flags); + + void setTransparentForMouseEvents(bool transparent); + void updateDoesNotAcceptFocus(bool doesNotAcceptFocus); + -+ QRect windowToWmGeometry(QRect r) const; + void sendXEmbedMessage(xcb_window_t window, quint32 message, + quint32 detail = 0, quint32 data1 = 0, quint32 data2 = 0); + void handleXEmbedMessage(const xcb_client_message_event_t *event); @@ -2916,8 +3292,6 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + void doFocusIn(); + void doFocusOut(); + -+ bool compressExposeEvent(QRegion &exposeRegion); -+ + void handleButtonPressEvent(int event_x, int event_y, int root_x, int root_y, + int detail, Qt::KeyboardModifiers modifiers, xcb_timestamp_t timestamp, + QEvent::Type type, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); @@ -2948,15 +3322,13 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q + + Qt::WindowStates m_windowState = Qt::WindowNoState; + -+ xcb_gravity_t m_gravity = XCB_GRAVITY_STATIC; -+ + bool m_mapped = false; + bool m_transparent = false; -+ bool m_usingSyncProtocol = false; + bool m_deferredActivation = false; + bool m_embedded = false; + bool m_alertState = false; + bool m_minimized = false; ++ bool m_trayIconWindow = false; + xcb_window_t m_netWmUserTimeWindow = XCB_NONE; + + QSurfaceFormat m_format; @@ -3000,9 +3372,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +Q_DECLARE_METATYPE(QXcbWindow*) + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwmsupport.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwmsupport.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwmsupport.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbwmsupport.h 2018-12-15 11:51:30.630161854 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwmsupport.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwmsupport.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwmsupport.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbwmsupport.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,68 @@ +/**************************************************************************** +** @@ -3072,246 +3444,9 @@ diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/q +QT_END_NAMESPACE + +#endif -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxkbcommon.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxkbcommon.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxkbcommon.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxkbcommon.h 2018-12-15 11:51:30.630161854 +0100 -@@ -0,0 +1,233 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2018 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the plugins of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** 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. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+/* XConvertCase was copied from src/3rdparty/xkbcommon/src/keysym.c, -+ which contains the following license information: -+ -+ Copyright 1985, 1987, 1990, 1998 The Open Group -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the "Software"), -+ to deal in the Software without restriction, including without limitation -+ the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ and/or sell copies of the Software, and to permit persons to whom the -+ Software is furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice shall be included in -+ all copies or substantial portions of the Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+ AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ -+ Except as contained in this notice, the names of the authors or their -+ institutions shall not be used in advertising or otherwise to promote the -+ sale, use or other dealings in this Software without prior written -+ authorization from the authors. -+ -+ -+ -+ Copyright © 2009 Dan Nicholson -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the "Software"), -+ to deal in the Software without restriction, including without limitation -+ the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ and/or sell copies of the Software, and to permit persons to whom the -+ Software is furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice (including the next -+ paragraph) shall be included in all copies or substantial portions of the -+ Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ DEALINGS IN THE SOFTWARE. -+*/ -+ -+/* -+ The following code modifications were applied: -+ -+ XConvertCase() was renamed to xkbcommon_XConvertCase(), to not confuse it -+ with Xlib's XConvertCase(). -+ -+ UCSConvertCase() was renamed to qt_UCSConvertCase() and function's body was -+ replaced to use Qt APIs for doing case conversion, which should give us better -+ results instead of using the less complete version from keysym.c -+*/ -+ -+#include -+#include -+ -+QT_BEGIN_NAMESPACE -+ -+static void qt_UCSConvertCase(uint32_t code, xkb_keysym_t *lower, xkb_keysym_t *upper) -+{ -+ *lower = QChar::toLower(code); -+ *upper = QChar::toUpper(code); -+} -+ -+void xkbcommon_XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper) -+{ -+ /* Latin 1 keysym */ -+ if (sym < 0x100) { -+ qt_UCSConvertCase(sym, lower, upper); -+ return; -+ } -+ -+ /* Unicode keysym */ -+ if ((sym & 0xff000000) == 0x01000000) { -+ qt_UCSConvertCase((sym & 0x00ffffff), lower, upper); -+ *upper |= 0x01000000; -+ *lower |= 0x01000000; -+ return; -+ } -+ -+ /* Legacy keysym */ -+ -+ *lower = sym; -+ *upper = sym; -+ -+ switch (sym >> 8) { -+ case 1: /* Latin 2 */ -+ /* Assume the KeySym is a legal value (ignore discontinuities) */ -+ if (sym == XKB_KEY_Aogonek) -+ *lower = XKB_KEY_aogonek; -+ else if (sym >= XKB_KEY_Lstroke && sym <= XKB_KEY_Sacute) -+ *lower += (XKB_KEY_lstroke - XKB_KEY_Lstroke); -+ else if (sym >= XKB_KEY_Scaron && sym <= XKB_KEY_Zacute) -+ *lower += (XKB_KEY_scaron - XKB_KEY_Scaron); -+ else if (sym >= XKB_KEY_Zcaron && sym <= XKB_KEY_Zabovedot) -+ *lower += (XKB_KEY_zcaron - XKB_KEY_Zcaron); -+ else if (sym == XKB_KEY_aogonek) -+ *upper = XKB_KEY_Aogonek; -+ else if (sym >= XKB_KEY_lstroke && sym <= XKB_KEY_sacute) -+ *upper -= (XKB_KEY_lstroke - XKB_KEY_Lstroke); -+ else if (sym >= XKB_KEY_scaron && sym <= XKB_KEY_zacute) -+ *upper -= (XKB_KEY_scaron - XKB_KEY_Scaron); -+ else if (sym >= XKB_KEY_zcaron && sym <= XKB_KEY_zabovedot) -+ *upper -= (XKB_KEY_zcaron - XKB_KEY_Zcaron); -+ else if (sym >= XKB_KEY_Racute && sym <= XKB_KEY_Tcedilla) -+ *lower += (XKB_KEY_racute - XKB_KEY_Racute); -+ else if (sym >= XKB_KEY_racute && sym <= XKB_KEY_tcedilla) -+ *upper -= (XKB_KEY_racute - XKB_KEY_Racute); -+ break; -+ case 2: /* Latin 3 */ -+ /* Assume the KeySym is a legal value (ignore discontinuities) */ -+ if (sym >= XKB_KEY_Hstroke && sym <= XKB_KEY_Hcircumflex) -+ *lower += (XKB_KEY_hstroke - XKB_KEY_Hstroke); -+ else if (sym >= XKB_KEY_Gbreve && sym <= XKB_KEY_Jcircumflex) -+ *lower += (XKB_KEY_gbreve - XKB_KEY_Gbreve); -+ else if (sym >= XKB_KEY_hstroke && sym <= XKB_KEY_hcircumflex) -+ *upper -= (XKB_KEY_hstroke - XKB_KEY_Hstroke); -+ else if (sym >= XKB_KEY_gbreve && sym <= XKB_KEY_jcircumflex) -+ *upper -= (XKB_KEY_gbreve - XKB_KEY_Gbreve); -+ else if (sym >= XKB_KEY_Cabovedot && sym <= XKB_KEY_Scircumflex) -+ *lower += (XKB_KEY_cabovedot - XKB_KEY_Cabovedot); -+ else if (sym >= XKB_KEY_cabovedot && sym <= XKB_KEY_scircumflex) -+ *upper -= (XKB_KEY_cabovedot - XKB_KEY_Cabovedot); -+ break; -+ case 3: /* Latin 4 */ -+ /* Assume the KeySym is a legal value (ignore discontinuities) */ -+ if (sym >= XKB_KEY_Rcedilla && sym <= XKB_KEY_Tslash) -+ *lower += (XKB_KEY_rcedilla - XKB_KEY_Rcedilla); -+ else if (sym >= XKB_KEY_rcedilla && sym <= XKB_KEY_tslash) -+ *upper -= (XKB_KEY_rcedilla - XKB_KEY_Rcedilla); -+ else if (sym == XKB_KEY_ENG) -+ *lower = XKB_KEY_eng; -+ else if (sym == XKB_KEY_eng) -+ *upper = XKB_KEY_ENG; -+ else if (sym >= XKB_KEY_Amacron && sym <= XKB_KEY_Umacron) -+ *lower += (XKB_KEY_amacron - XKB_KEY_Amacron); -+ else if (sym >= XKB_KEY_amacron && sym <= XKB_KEY_umacron) -+ *upper -= (XKB_KEY_amacron - XKB_KEY_Amacron); -+ break; -+ case 6: /* Cyrillic */ -+ /* Assume the KeySym is a legal value (ignore discontinuities) */ -+ if (sym >= XKB_KEY_Serbian_DJE && sym <= XKB_KEY_Serbian_DZE) -+ *lower -= (XKB_KEY_Serbian_DJE - XKB_KEY_Serbian_dje); -+ else if (sym >= XKB_KEY_Serbian_dje && sym <= XKB_KEY_Serbian_dze) -+ *upper += (XKB_KEY_Serbian_DJE - XKB_KEY_Serbian_dje); -+ else if (sym >= XKB_KEY_Cyrillic_YU && sym <= XKB_KEY_Cyrillic_HARDSIGN) -+ *lower -= (XKB_KEY_Cyrillic_YU - XKB_KEY_Cyrillic_yu); -+ else if (sym >= XKB_KEY_Cyrillic_yu && sym <= XKB_KEY_Cyrillic_hardsign) -+ *upper += (XKB_KEY_Cyrillic_YU - XKB_KEY_Cyrillic_yu); -+ break; -+ case 7: /* Greek */ -+ /* Assume the KeySym is a legal value (ignore discontinuities) */ -+ if (sym >= XKB_KEY_Greek_ALPHAaccent && sym <= XKB_KEY_Greek_OMEGAaccent) -+ *lower += (XKB_KEY_Greek_alphaaccent - XKB_KEY_Greek_ALPHAaccent); -+ else if (sym >= XKB_KEY_Greek_alphaaccent && sym <= XKB_KEY_Greek_omegaaccent && -+ sym != XKB_KEY_Greek_iotaaccentdieresis && -+ sym != XKB_KEY_Greek_upsilonaccentdieresis) -+ *upper -= (XKB_KEY_Greek_alphaaccent - XKB_KEY_Greek_ALPHAaccent); -+ else if (sym >= XKB_KEY_Greek_ALPHA && sym <= XKB_KEY_Greek_OMEGA) -+ *lower += (XKB_KEY_Greek_alpha - XKB_KEY_Greek_ALPHA); -+ else if (sym >= XKB_KEY_Greek_alpha && sym <= XKB_KEY_Greek_omega && -+ sym != XKB_KEY_Greek_finalsmallsigma) -+ *upper -= (XKB_KEY_Greek_alpha - XKB_KEY_Greek_ALPHA); -+ break; -+ case 0x13: /* Latin 9 */ -+ if (sym == XKB_KEY_OE) -+ *lower = XKB_KEY_oe; -+ else if (sym == XKB_KEY_oe) -+ *upper = XKB_KEY_OE; -+ else if (sym == XKB_KEY_Ydiaeresis) -+ *lower = XKB_KEY_ydiaeresis; -+ break; -+ } -+} -+ -+xkb_keysym_t xkbcommon_xkb_keysym_to_upper(xkb_keysym_t ks) -+{ -+ xkb_keysym_t lower, upper; -+ -+ xkbcommon_XConvertCase(ks, &lower, &upper); -+ -+ return upper; -+} -+ -+QT_END_NAMESPACE -diff -r -u -N qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxsettings.h qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxsettings.h ---- qt5dxcb-plugin-1.1.20-old/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxsettings.h 1970-01-01 01:00:00.000000000 +0100 -+++ qt5dxcb-plugin-1.1.20/platformplugin/libqt5xcbqpa-dev/5.11.3/qxcbxsettings.h 2018-12-15 11:51:30.631161864 +0100 +diff -urN qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbxsettings.h qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbxsettings.h +--- qt5dxcb-plugin-1.2.5.old/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbxsettings.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt5dxcb-plugin-1.2.5/platformplugin/libqt5xcbqpa-dev/5.13.0/qxcbxsettings.h 2019-07-12 20:19:55.903986508 +0000 @@ -0,0 +1,71 @@ +/**************************************************************************** +** diff --git a/srcpkgs/qt5dxcb-plugin/template b/srcpkgs/qt5dxcb-plugin/template index bec958d6149..524e061e7be 100644 --- a/srcpkgs/qt5dxcb-plugin/template +++ b/srcpkgs/qt5dxcb-plugin/template @@ -1,14 +1,14 @@ # Template file for 'qt5dxcb-plugin' pkgname=qt5dxcb-plugin version=1.2.5 -revision=1 +revision=2 build_style=qmake make_build_args="VERSION=${version}" hostmakedepends="pkg-config qt5-qmake" makedepends="cairo-devel libSM-devel libXi-devel libxkbcommon-devel qt5-x11extras-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel" -depends="qt5>=5.11.3<5.11.4" +depends="qt5>=5.13.0<5.13.1" short_desc="Qt platform plugins for DDE" maintainer="John " license="GPL-3.0-or-later"