datacontrolv1: reset offer if receive null selection
Change-Id: Ifc88b5cb54299df9177afe6ed9bcaa46b1fe21fb Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
936260bbb9
commit
6d3f6d3ae5
@ -96,7 +96,8 @@ void QWaylandDataControlDeviceV1::zwlr_data_control_device_v1_data_offer(zwlr_da
|
|||||||
void QWaylandDataControlDeviceV1::zwlr_data_control_device_v1_selection(zwlr_data_control_offer_v1 *id)
|
void QWaylandDataControlDeviceV1::zwlr_data_control_device_v1_selection(zwlr_data_control_offer_v1 *id)
|
||||||
{
|
{
|
||||||
if (!id)
|
if (!id)
|
||||||
return;
|
m_selectionOffer.reset();
|
||||||
|
else
|
||||||
m_selectionOffer.reset(static_cast<QWaylandDataControlOfferV1 *>(zwlr_data_control_offer_v1_get_user_data(id)));
|
m_selectionOffer.reset(static_cast<QWaylandDataControlOfferV1 *>(zwlr_data_control_offer_v1_get_user_data(id)));
|
||||||
|
|
||||||
// The selection event may be sent before platfrmIntegration is set.
|
// The selection event may be sent before platfrmIntegration is set.
|
||||||
@ -114,7 +115,8 @@ void QWaylandDataControlDeviceV1::zwlr_data_control_device_v1_finished()
|
|||||||
void QWaylandDataControlDeviceV1::zwlr_data_control_device_v1_primary_selection(struct ::zwlr_data_control_offer_v1 *id)
|
void QWaylandDataControlDeviceV1::zwlr_data_control_device_v1_primary_selection(struct ::zwlr_data_control_offer_v1 *id)
|
||||||
{
|
{
|
||||||
if (!id)
|
if (!id)
|
||||||
return;
|
m_primarySelectionOffer.reset();
|
||||||
|
else
|
||||||
m_primarySelectionOffer.reset(static_cast<QWaylandDataControlOfferV1 *>(zwlr_data_control_offer_v1_get_user_data(id)));
|
m_primarySelectionOffer.reset(static_cast<QWaylandDataControlOfferV1 *>(zwlr_data_control_offer_v1_get_user_data(id)));
|
||||||
|
|
||||||
// The selection event may be sent before platfrmIntegration is set.
|
// The selection event may be sent before platfrmIntegration is set.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user