Skip to content

Client: Always populate mimedata in drags

It's possible for clients to perform a drag and drop operation within their own client without any mimeData. A user can directly access the original drag.

On wayland without any mimedata it's impossible for a client to accept a drag as the mechansim involved is to either select a given mimedata entry or an empty string. Within Qt we always accept the first format if we accept a drag.

When dragging within our own window we also start a wayland drag so will receive a cancel event from the compositor if the compositor doesn't believe the client has accepted the drag.

This patch provides a dummy mimedata entry so that something can be accepted.

Fixes: QTBUG-112161 Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I6309d82e20545e10ebdb9dafde7e13a5e3be5ff2 Reviewed-by: Liang Qi liang.qi@qt.io (cherry picked from commit 32fedb6f)

  • asturmlechner 2023-10-24: Backported L1 literal as QString::fromLatin1

Merge request reports