From 609725c651806e204e75f397ac60d98c23e8ba3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Wed, 13 Aug 2025 17:25:46 +0200 Subject: wayland: Set ignore drop action for rejected drop response Pick-to: 6.10 Change-Id: Ia0b971244b71185ced9e024ecaf6f8510f80b62e Reviewed-by: David Edmundson --- src/plugins/platforms/wayland/qwaylanddatadevice.cpp | 2 +- src/plugins/platforms/wayland/qwaylanddnd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp index 4505a487bc4..71ed2a2c4db 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp +++ b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp @@ -132,7 +132,7 @@ bool QWaylandDataDevice::startDrag(QMimeData *mimeData, Qt::DropActions supporte // from canceling mid-drag the drag is accepted here as the // we know if the widget is over a zone where it can be // incorporated or not - response = { accepted, Qt::MoveAction }; + response = { true, Qt::MoveAction }; } static_cast(QGuiApplicationPrivate::platformIntegration()->drag()) ->setDropResponse(response); diff --git a/src/plugins/platforms/wayland/qwaylanddnd.cpp b/src/plugins/platforms/wayland/qwaylanddnd.cpp index 096d7e5b586..41c4f598dfa 100644 --- a/src/plugins/platforms/wayland/qwaylanddnd.cpp +++ b/src/plugins/platforms/wayland/qwaylanddnd.cpp @@ -92,7 +92,7 @@ void QWaylandDrag::setResponse(const QPlatformDropQtResponse &response) void QWaylandDrag::setDropResponse(const QPlatformDropQtResponse &response) { - setExecutedDropAction(response.acceptedAction()); + setExecutedDropAction(response.isAccepted() ? response.acceptedAction() : Qt::IgnoreAction); } void QWaylandDrag::finishDrag() -- cgit v1.2.3