summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2023-11-13 17:38:38 +0100
committerLiang Qi <liang.qi@qt.io>2023-12-20 16:09:22 +0000
commitc28b35521943646f5de5fbc44888f66a01e7a849 (patch)
tree131e7e552606af78cb5bc9e648270ca26f905777 /src/client
parent7483e4de88ef95f9a1c9a36fdf79252baf059139 (diff)
QWaylandMimeData: Skip "DELETE" format
This is presumably a left-over from XDND: https://freedesktop.org/wiki/Specifications/XDND/ > In general, XdndActionMove is implemented by first requesting the data > and then the special target DELETE defined in the X Selection > protocol. [...] DELETE should be sent before XdndFinished. Firefox sends this during dragging of files but trying to fetch it will fail, leading to a timeout and potential freeze. Pick-to: 6.7 6.6 6.5 Change-Id: Ic30f5cb23587c63d54859c5eaebb3a054a25ac69 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/qwaylanddataoffer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp
index c2fc9f095..94cd249fa 100644
--- a/src/client/qwaylanddataoffer.cpp
+++ b/src/client/qwaylanddataoffer.cpp
@@ -149,8 +149,11 @@ QWaylandMimeData::~QWaylandMimeData()
void QWaylandMimeData::appendFormat(const QString &mimeType)
{
- m_types << mimeType;
- m_data.remove(mimeType); // Clear previous contents
+ // "DELETE" is a potential leftover from XdndActionMode sent by e.g. Firefox, ignore it.
+ if (mimeType != QLatin1String("DELETE")) {
+ m_types << mimeType;
+ m_data.remove(mimeType); // Clear previous contents
+ }
}
bool QWaylandMimeData::hasFormat_sys(const QString &mimeType) const