Summary: | Consider whether wl_data_offer::accept should really require a MIME type | ||
---|---|---|---|
Product: | Wayland | Reporter: | Michael Catanzaro <mcatanzaro> |
Component: | wayland | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | minor | ||
Priority: | medium | CC: | mcatanzaro |
Version: | 1.5.0 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 91948 |
Description
Michael Catanzaro
2015-09-09 21:10:25 UTC
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? (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 -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/wayland/issues/42. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.