Skip to content

wayland/data-device: Clear existing data device resource from list

Robert Mader requested to merge rmader/mutter:data-device-cleanup into master

Compositor behaviour when calling wl_data_device_manager_get_data_device for the same seat multiple times is not very clearly defined in the spec and both Mutter and Weston currently don't handle the DnD case properly.

While Weston handles DnD only for the last created data device, Mutter, because of some internal reshuffling, ends up toggling between two devices.

Properly handling this case requires some bigger changes. So in order to behave predictable and in line with Weston, only take the last created data device into account while still keeping the previous created ones around.

The main affect client here is Firefox, which gets very confused by the toggling behaviour and becomes more stable with this patch.


See also https://gitlab.freedesktop.org/wayland/wayland/-/issues/202#note_895397

Edited by Robert Mader

Merge request reports