summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2015-02-06 07:34:43 +0100
committerMartin Gräßlin <mgraesslin@kde.org>2015-03-26 15:22:44 +0000
commit9f1f8aaa92cdd0a1a655bb7dc4fae200c805489d (patch)
treee31cb4a09de2780b4574cdc438563033ddfa6755 /src/plugins
parentf451d4800595caf00b6aa61408006cd100a6d416 (diff)
Handle SelectionWindowDestroy in QXcbClipboard
This change is related to 6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2 which added handling for SelectionClientClose. Further testing showed that with e.g. Qt 4 applications the SelectionClientClose is not emitted, but the selection window seems to be destroyed before the client is destroyed. Fur a destroyed selection window the same applies: the clipboard content is no longer valid and we should emit the changed signal. Change-Id: Id3778a28b9f5601bf2c6e0106981316e0efa6e7c Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
index f56a29d985..4b6caa9620 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -742,7 +742,8 @@ void QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve
m_xClipboard[mode]->reset();
}
emitChanged(mode);
- } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE)
+ } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE ||
+ event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY)
emitChanged(mode);
}