[Wayland-bugs] [Bug 91950] Consider whether wl_data_offer::accept should really require a MIME type

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 10 08:11:07 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91950

Michael Catanzaro <mcatanzaro at gnome.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at gnome.org

--- Comment #2 from Michael Catanzaro <mcatanzaro at gnome.org> ---
(In reply to Pekka Paalanen from comment #1)
> 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?

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, bug #91949).

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]
https://code.google.com/p/chromium/codesearch#chromium/src/ui/wm/public/drag_drop_delegate.h

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150910/bde08e1c/attachment.html>


More information about the wayland-bugs mailing list