Emit signal before DataControlSource destruction

SeatInterface cleans up when a data source goes away. However the
cleanup also makes use of metaobjects so needs to run before the leaf
class destructor is run.

All other AbstractDataSource objects emit the unbound signal, which
SeatInterface also connects to do a earlier cleanup. Otherwise we get a
crash if a data control source replaces itself.
This commit is contained in:
David Edmundson 2020-07-23 11:15:34 +01:00
parent 3994faff50
commit ef539368d9

View file

@ -40,6 +40,7 @@ DataControlSourceV1InterfacePrivate::DataControlSourceV1InterfacePrivate(DataCon
void DataControlSourceV1InterfacePrivate::zwlr_data_control_source_v1_destroy_resource(QtWaylandServer::zwlr_data_control_source_v1::Resource *resource)
{
Q_UNUSED(resource)
emit q->unbound();
delete q;
}