Skip to content

DND: Refactor using Draggable and DropTarget Interfaces

Marco Trevisan requested to merge dnd-draggable-delgate-removal into this.actor-removal

This is a continuation of GNOME/gnome-shell!559 (merged), which I prefer to discuss separately because it touches a more delicate are and is also more complicated than the other.

So, since as per the said MR all the relevant UI elements are now actors, we can use GObject.Interface for actors who supports to be dragged or drop targets. Then define DND.Draggable which must be implemented by classes who are eligible to be dragged around, and DND.DropTarget which must be implemented by those actors which can be targets.

Also make Draggable more strong to support targets that might destroy it, and removing basically all the _delegate instances around (the remaining ones are for menus which is handled by GNOME/gnome-shell!500).

I've tested this quite a lot in various scenarios and so far I didn't encounter any regression, but some more testing would be welcome.

CC: @verdre, @rmader, @fmuellner as you were involved with prerequisite as well.

Merge request reports