summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddataoffer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a corner case freed memory use/crashGiulio Camuffo2015-06-091-1/+1
| | | | | | | | | | | QWaylandDisplay::flushRequests() does not only flush them, but also dispatches the pending events. If we have two wl_data_device.selection events in the queue we must not dispatch the second one while we are dealing with the first one because that will replace the data offer and delete us while we're in QWaylandMimeData::retrieveData_sys(). Change-Id: Ib58ca571867faa2633daa9ec94fe7094df02e9fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-171-22/+14
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-161-4/+21
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddataoffer.cpp src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurfaceitem.cpp Change-Id: I2eae0fd43a71fbfd7c907ca715707a26f3c134c5
| * Fix pasting from sources advertising the utf8 charsetGiulio Camuffo2015-01-291-4/+21
| | | | | | | | | | | | | | | | | | Some clients use "text/plain;charset=utf8" as the mimetype for the clipboard instead of just "text/plain". Since we support Utf8 accept it as a valid type. Change-Id: Icd540f0ff507ed9917b374f3b40fbdc259ce9ee2 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+4
|/ | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix retrieving the selection/dnd dataGiulio Camuffo2014-09-151-18/+16
| | | | | | | | | | | | | | | | | | 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>
* Reduce headers inter-dependency in the QPA pluginGiulio Camuffo2014-06-161-0/+1
| | | | | Change-Id: I8b810e54531453b6a80250555c21bb0b1e6e76cc Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Clipboard: perform non-blocking reads from compositorAndrew Knight2014-04-241-19/+45
| | | | | | | | | | | | | | | Since the compositor recycles file descriptors when offering data to clients, it is possible that a client (or multiple clients) can attempt to read from the same FD simultaneously, creating a situation where one read can wait indefinitely for data. By making the pipe non-blocking, the client can gracefully time-out if data doesn't arrive in a timely manner. This commit also ensures that only one FD is open per client per offered mime type. Change-Id: If052e5bf8198df1cdc8fc4df360f83a77950b2f9 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Make classes in client privateJorgen Lind2013-12-271-2/+2
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Move wayland into a client directory not under the plugins src folderJorgen Lind2013-12-271-0/+139
And make wayland common files into a library, exporting all classes. Now there is no need to do bulild hacks to make your own version of the wayland plugin. Change-Id: Ib4872863dfb5ab3f2bc0f4a94ae16fc1e7b63b88 Reviewed-by: Andy Nichols <andy.nichols@digia.com>