qt5-qtwayland/0003-Client-Connect-drags-being-accepted-to-updating-the-.patch
Jan Grulich f152a4bcb2 5.15.9
2023-05-18 19:47:50 +00:00

40 lines
1.8 KiB
Diff

From eb8e933841d66f0ebe071a170a9af995c2b07b0d Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org>
Date: Tue, 9 Feb 2021 16:09:21 +0000
Subject: [PATCH 03/55] Client: Connect drags being accepted to updating the
source drag icon
Currently in a multi-process drag and drop when the other client accepts
a given mimetype for dropping it calls accept, which is received by the
client, but the drag cursor is never updated.
Instead the drag cursor was updated in the data_device_enter events
which only works if we are operating within one process.
The code existed to handle this existed but both the targetChanged
signal and the dragSourceTargetChanged were unused.
Change-Id: I443f31f1b2ef72d4b5eadaf7115f97544dac883a
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 08e478448a97a440d5a968a5d797f0d7302140c2)
---
src/client/qwaylanddatadevice.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index 7e2e3308..bbd2d568 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -124,6 +124,7 @@ bool QWaylandDataDevice::startDrag(QMimeData *mimeData, QWaylandWindow *icon)
m_dragSource.reset(new QWaylandDataSource(m_display->dndSelectionHandler(), mimeData));
connect(m_dragSource.data(), &QWaylandDataSource::cancelled, this, &QWaylandDataDevice::dragSourceCancelled);
+ connect(m_dragSource.data(), &QWaylandDataSource::targetChanged, this, &QWaylandDataDevice::dragSourceTargetChanged);
start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial());
return true;
--
2.40.0