diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-17 14:15:53 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-17 14:43:26 +0100 |
commit | e5ac4afbf954a3e1616ce8543d46ddc668d0374f (patch) | |
tree | be6d97001edebd5cb74c64aaf0010f3cc76a7293 /src/plugins/platforms/xcb/qxcbclipboard.cpp | |
parent | e3ed95dd44b95b6e9361b562807e711d7ce5a58b (diff) | |
parent | 03c1a6ac717e3c5693653a5e294214056bda970e (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
mkspecs/features/mac/default_post.prf
mkspecs/features/uikit/default_post.prf
Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbclipboard.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbclipboard.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp index f9c32cd0a4..38e91cc9f6 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.cpp +++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp @@ -729,8 +729,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 { |