From 29a5541ccf65c7f54131e14678b752e612968cae Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 12 Jun 2024 16:36:01 +0300 Subject: [PATCH] wayland: Reset dnd state when the target surface is about to be destroyed Use the SurfaceInterface::aboutToBeDestroyed() for the consistency sake with other code that performs cleanup when the wl_surface is destroyed. --- src/wayland/datadevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/datadevice.cpp b/src/wayland/datadevice.cpp index eec66331a3..0bff2894eb 100644 --- a/src/wayland/datadevice.cpp +++ b/src/wayland/datadevice.cpp @@ -301,7 +301,7 @@ void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 se d->send_motion(d->seat->timestamp().count(), wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y())); }); } - d->drag.destroyConnection = connect(d->drag.surface, &QObject::destroyed, this, [this] { + d->drag.destroyConnection = connect(d->drag.surface, &SurfaceInterface::aboutToBeDestroyed, this, [this] { d->send_leave(); if (d->drag.posConnection) { disconnect(d->drag.posConnection);