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>
This commit is contained in:
parent
c7c22eaacd
commit
8013130a7b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user