From 169257416e5a545349d0a39184d41c9531572b6b Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 10 Aug 2023 09:13:48 +0100 Subject: [PATCH] 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 --- src/wayland/seat_interface.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index 0eff3e2043..873642db67 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -223,12 +223,8 @@ void SeatInterfacePrivate::registerDataControlDevice(DataControlDeviceV1Interfac q->setPrimarySelection(dataDevice->primarySelection()); }); - if (currentSelection) { - dataDevice->sendSelection(currentSelection); - } - if (currentPrimarySelection) { - dataDevice->sendPrimarySelection(currentPrimarySelection); - } + dataDevice->sendSelection(currentSelection); + dataDevice->sendPrimarySelection(currentPrimarySelection); } void SeatInterfacePrivate::registerPrimarySelectionDevice(PrimarySelectionDeviceV1Interface *primarySelectionDevice)