<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:mcatanzaro@gnome.org" title="Michael Catanzaro <mcatanzaro@gnome.org>"> <span class="fn">Michael Catanzaro</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Consider whether wl_data_offer::accept should really require a MIME type"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91950">bug 91950</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>mcatanzaro@gnome.org
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Consider whether wl_data_offer::accept should really require a MIME type"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91950#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Consider whether wl_data_offer::accept should really require a MIME type"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91950">bug 91950</a>
from <span class="vcard"><a class="email" href="mailto:mcatanzaro@gnome.org" title="Michael Catanzaro <mcatanzaro@gnome.org>"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
<pre>(In reply to Pekka Paalanen from <a href="show_bug.cgi?id=91950#c1">comment #1</a>)
<span class="quote">> Could you explain more on how your client does not know what mime type it is
> going to select when it has already decided that it can accept the drop?
>
> What changes the preferred mime type between hover and drop?</span >
The client is Chromium. The interface between the Wayland backend code and
Chromium's cross-platform DnD abstraction is DragDropDelegate [1] which
contains one function that looks like this:
virtual int OnDragUpdated(const ui::DropTargetEvent& event) = 0;
The DropTargetEvent passes all of the drag data (already received from the drag
source) to Chromium, and the return value indicates to the platform backend
whether Chromium has chosen to accept the drag. But it doesn't indicate what
type of data that Chromium will choose to use, only that it will some of the
data (and also which DnD action it will pick, <a class="bz_bug_link
bz_status_NEW "
title="NEW - Add support for drag actions"
href="show_bug.cgi?id=91949">bug #91949</a>).
We could change this, but it would not be easy, and would reduce the chances of
upstreaming the code. It's more desirable to simply guess which MIME type to
use when calling wl_data_offer::accept, which will be right more often than
not, and almost always harmless (I've yet to discover a client that changes the
drag image based on the MIME type indicated in the accept messages). That's
non-ideal, though.
[1]
<a href="https://code.google.com/p/chromium/codesearch#chromium/src/ui/wm/public/drag_drop_delegate.h">https://code.google.com/p/chromium/codesearch#chromium/src/ui/wm/public/drag_drop_delegate.h</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>