diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2017-06-09 21:41:32 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2017-06-10 07:59:30 +0200 |
commit | 7fcf911785efe14cd9d217bfb3c8f1613b2ba6ea (patch) | |
tree | a9ee25def328ab23608b5ba2d65088b8483002a8 /dev-qt/qtgui/files | |
parent | dev-ruby/oauth2: add 1.4.0 (diff) | |
download | gentoo-7fcf911785efe14cd9d217bfb3c8f1613b2ba6ea.tar.gz gentoo-7fcf911785efe14cd9d217bfb3c8f1613b2ba6ea.tar.bz2 gentoo-7fcf911785efe14cd9d217bfb3c8f1613b2ba6ea.zip |
dev-qt/qtgui: Fix QClipboard behaviour on XCB
This fix is also in 5.6.3 and >=5.8.0.
See also:
https://bugreports.qt.io/browse/QTBUG-56972
https://bugs.kde.org/show_bug.cgi?id=348390
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'dev-qt/qtgui/files')
-rw-r--r-- | dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch b/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch new file mode 100644 index 000000000000..42ee58b611fe --- /dev/null +++ b/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch @@ -0,0 +1,39 @@ +From 291eba6f8099a0fec8fbd9cf8a1fb67e5c9f4f8d Mon Sep 17 00:00:00 2001 +From: Palo Kisa <palo.kisa@gmail.com> +Date: Mon, 7 Nov 2016 18:27:17 +0100 +Subject: QClipboard: Fix emitting changed() in XCB + +In XCB environment the QClipboard::changed() was not delivered if the +QClipboard::clear() was issued by other Qt app/process. + +If the QClipboard::clear() is used, then the owner in +xcb_xfixes_selection_notify_event_t is XCB_NONE, so we need make the +decission to handle this event by the selection_timestamp and our +m_timestamp[mode]. + +Task-number: QTBUG-56972 +Change-Id: If4c486ac02223eac506465cac7ff1a07bd02a187 +Reviewed-by: Lars Knoll <lars.knoll@qt.io> +--- + src/plugins/platforms/xcb/qxcbclipboard.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp +index d44ebae..40abef4 100644 +--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp ++++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp +@@ -723,8 +723,10 @@ void QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve + if (mode > QClipboard::Selection) + return; + +- // here we care only about the xfixes events that come from non Qt processes +- if (event->owner != XCB_NONE && event->owner != owner()) { ++ // Note1: Here we care only about the xfixes events that come from other processes. ++ // Note2: If the QClipboard::clear() is issued, event->owner is XCB_NONE, ++ // so we check selection_timestamp to not handle our own QClipboard::clear(). ++ if (event->owner != owner() && event->selection_timestamp > m_timestamp[mode]) { + if (!m_xClipboard[mode]) { + m_xClipboard[mode].reset(new QXcbClipboardMime(mode, this)); + } else { +-- +cgit v1.0-4-g1e03 |