wayland: Send data device selections to data control on bind even if null

Specification for data control states:
"The first selection event is sent upon binding the
wlr_data_control_device object."

This differs to other data devices.

CCBUG: 459389
This commit is contained in:
David Edmundson 2023-08-10 09:13:48 +01:00
parent b0897a9aa5
commit 169257416e

View file

@ -223,12 +223,8 @@ void SeatInterfacePrivate::registerDataControlDevice(DataControlDeviceV1Interfac
q->setPrimarySelection(dataDevice->primarySelection()); q->setPrimarySelection(dataDevice->primarySelection());
}); });
if (currentSelection) {
dataDevice->sendSelection(currentSelection); dataDevice->sendSelection(currentSelection);
}
if (currentPrimarySelection) {
dataDevice->sendPrimarySelection(currentPrimarySelection); dataDevice->sendPrimarySelection(currentPrimarySelection);
}
} }
void SeatInterfacePrivate::registerPrimarySelectionDevice(PrimarySelectionDeviceV1Interface *primarySelectionDevice) void SeatInterfacePrivate::registerPrimarySelectionDevice(PrimarySelectionDeviceV1Interface *primarySelectionDevice)