Group: Fix pinned icon drag crash

Fix a crash that can occur when reordering pinned icons.

The drag-and-drop implementation previously copied part of the Group object into the GTK selection data and later treated the copied buffer as a Group pointer. This could result in an invalid pointer being passed to Dock::moveButton().

The updated implementation:

  • Uses the application identifier as the drag payload instead of copying object memory.
  • Validates the selection target, format, and length.
  • Resolves the identifier against the active group collection.
  • Ignores invalid or unresolved payloads.
  • Removes Ctrl-key cancellation that interfered with pinned-icon reordering.

This ensures that only a valid Group from the active collection is passed to Dock::moveButton(), preventing invalid memory access during reordering.

Tested on FreeBSD on X11.

Merge request reports

Loading