diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-09-12 13:44:42 +0300 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-09-15 11:54:03 +0200 |
commit | ed912471bd449044ddc36b902ebb32b53ee548de (patch) | |
tree | 56e235405d9a554daf3784d50827c4012714ecae /src/client/qwaylanddataoffer_p.h | |
parent | 99c1b8e53f9a2ba6e8c549f15b0d3008bf12c3f1 (diff) | |
download | qtwayland-ed912471bd449044ddc36b902ebb32b53ee548de.tar.gz |
Fix retrieving the selection/dnd data
Installing a roudtrip on the custom event queue in the wl_data_offer.offer
handler is broken because that triggers a wl_data_device.selection event,
which emits the QClipboard changed signal, so code listening to it may end
up trying to retrieve the clipboard data before the roundtrip ends.
Additionally, we're calling wl_data_offer.receive for each mime type, even
if then we never read from the fd, making the source client do work for no
reason. Instead, call wl_data_offer.receive retrieveData_sys, that is when
actually retreiving the data.
We don't need to install a roundtrip after that, just flushing out the
requests is enough, because we wait up to one second for the source client
to write into the fd.
Change-Id: I180779e375ebd5a22af7084458505a41107fab19
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/client/qwaylanddataoffer_p.h')
-rw-r--r-- | src/client/qwaylanddataoffer_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h index a21e18bd..12fc0a22 100644 --- a/src/client/qwaylanddataoffer_p.h +++ b/src/client/qwaylanddataoffer_p.h @@ -87,7 +87,7 @@ private: mutable QWaylandDataOffer *m_dataOffer; QWaylandDisplay *m_display; - mutable QHash<QString, int> m_types; + mutable QStringList m_types; mutable QHash<QString, QByteArray> m_data; }; |