From 689c4009fb9be348f9137a9092b068e056a3d8b3 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 5 Jan 2012 11:11:27 +0100 Subject: Check for the clipboard manager when looping due to app quiting One can be extremely unlucky and on session logout get this: * All apps are going down * A Qt app checks if the clipboard manager is there to yield its clipboard contents * The clipboard manager is still there * Then just after that check, the clipboard manager finishes because of the session end * This means the Qt app will loop for 5 seconds trying to yield its clipboard contents to a clipboard manager that is not there anymore Change-Id: Ia89670d4deb72f12e660a0d7aa5b2d212955d6fe Reviewed-by: Lars Knoll --- src/plugins/platforms/xcb/qxcbclipboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/qxcbclipboard.h') diff --git a/src/plugins/platforms/xcb/qxcbclipboard.h b/src/plugins/platforms/xcb/qxcbclipboard.h index 9debdcefbb..e9ddb70f8f 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.h +++ b/src/plugins/platforms/xcb/qxcbclipboard.h @@ -85,7 +85,7 @@ public: QByteArray getSelection(xcb_atom_t selection, xcb_atom_t target, xcb_atom_t property); private: - xcb_generic_event_t *waitForClipboardEvent(xcb_window_t win, int type, int timeout); + xcb_generic_event_t *waitForClipboardEvent(xcb_window_t win, int type, int timeout, bool needsManager = 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); -- cgit v1.2.3