[Wayland-bugs] [Bug 91944] wl_data_source should have an event to indicate completion of a drag session
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Sep 9 13:03:39 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=91944
Bug ID: 91944
Summary: wl_data_source should have an event to indicate
completion of a drag session
Product: Wayland
Version: 1.5.0
Hardware: x86-64 (AMD64)
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: wayland
Assignee: wayland-bugs at lists.freedesktop.org
Reporter: mcatanzaro at gnome.org
When GTK+ is a drag source, it assumes that a drag session has ended after it
handles the data_source.send event. After handling data_source.send, it frees
memory associated with the drag session and releases its manual pointer grab,
causing data_offer.leave to be immediately sent to the destination client. This
causes several incompatibilities with the reference weston-dnd client:
* Unlike weston-dnd, it's impossible to send multiple different types of data
in the same session.
* This breaks Wayland clients that request transfer of data before the drop is
performed, which is well-supported by weston-dnd.
But GTK+ does this because anything else would be wrong: there is no other way
for the drag source to know when the drag session is over, other than to assume
that it ends during data_source.send. The weston-dnd client does not have these
issues because it has no need for a client-side grab (which must be released
when the DnD session is complete) and it simply leaks all memory associated
with the DnD sessions (bug #91943), which would be unacceptable for GTK+.
One way to fix this would be to add a new event, wl_data_source.drag_finished,
which the compositor would send to the source client at the same time it sends
wl_data_device.leave to the destination client. This has already been
implemented by Carlos Garnacho in [1] and [2], though it is just a subset of
the functionality added in those patches. GTK+ would then be modified to
release its grab in response to that event instead.
[1] http://lists.freedesktop.org/archives/wayland-devel/2015-June/022517.html
[2] http://lists.freedesktop.org/archives/wayland-devel/2015-June/022518.html
--
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/20150909/e0700e67/attachment.html>
More information about the wayland-bugs
mailing list