From cd512fee2bf4993c43a0af65843099194bf371fa Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 10 Sep 2021 14:27:52 +0300 Subject: [PATCH] Fix a typo It makes more sense to test primarySelection(). --- src/wayland/seat_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index 4c73f43b0d..e046c72e21 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -227,7 +227,7 @@ void SeatInterfacePrivate::registerDataControlDevice(DataControlDeviceV1Interfac // Special klipper workaround to avoid a race // If the mimetype x-kde-onlyReplaceEmpty is set, and we've had another update in the meantime, do nothing // See https://github.com/swaywm/wlr-protocols/issues/92 - if (dataDevice->selection() && dataDevice->primarySelection()->mimeTypes().contains(QLatin1String("application/x-kde-onlyReplaceEmpty")) + if (dataDevice->primarySelection() && dataDevice->primarySelection()->mimeTypes().contains(QLatin1String("application/x-kde-onlyReplaceEmpty")) && currentPrimarySelection) { dataDevice->primarySelection()->cancel(); return;