Skip to content

dnd: Repick target actor if destroyed mid iteration

The picked target actor may be destroyed (e.g. hover style change resulting in the ClutterTexture to be destroyed). If we don't handle this, GJS will abort when it sees the exception caused by Javascript code trying to access the destroyed target actor.

To handle it, listen on the 'destroy' signal on the target actor, and repick, so a valid actor is passed to the next motion callback.

Fixes: #632 (closed)

Merge request reports