From f381ad63a2d51033272c72f3a816fcfe9de000e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 6 Feb 2015 07:34:43 +0100 Subject: 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: I173e272dbe912084deed5342d7a4adb55ea1974f Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbclipboard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp index 2c0a7a11cc..248d1b4bbb 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.cpp +++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp @@ -749,7 +749,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); } -- cgit v1.2.3