summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddatadevice_p.h
diff options
context:
space:
mode:
authorLi Qiu <li.qiu@yahoo.com>2014-08-27 18:24:52 +0300
committerLi Qiu <li.qiu@yahoo.com>2014-09-04 10:13:01 +0200
commita34716370185d98ab0de25903913d8f2c7c821fa (patch)
tree3c0c1f2389d192abf20c5273a1172f5882d40728 /src/client/qwaylanddatadevice_p.h
parent1e052dd2de91506f71443e50bf225756d5ad69b1 (diff)
DataOffer not invalidated when client loses keyboard focus
The data_offer object should be invalidated when client loses keyboard focus. Otherwise in following scenario, it will become zombie object: start app1 -> copy text -> start app2 -> paste text -> close app1 -> paste again in app2 -> seg fault in qtwayland. The root cause is that when app2 takes focus the first time, data_device.data_offer event was sent to it from DataDevice::setFocus. When app1 is closed, the data source reference in data offer becomes invalid. so when trying to paste again in app2, segmentation faults Change-Id: I16a584e80fddaadd269b00cdf39eb405dd95b622 Task-number: QTBUG-41005 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src/client/qwaylanddatadevice_p.h')
-rw-r--r--src/client/qwaylanddatadevice_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index f5fad1772..dae91290e 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -65,6 +65,7 @@ public:
~QWaylandDataDevice();
QWaylandDataOffer *selectionOffer() const;
+ void invalidateSelectionOffer();
QWaylandDataSource *selectionSource() const;
void setSelectionSource(QWaylandDataSource *source);