Files
photocraft/docs
Hasan Zayni d7bb456cb1 Drops: route by a pure function, say when a folder is dropped, log how far a drag got (#10492)
A file dragged onto the window did nothing visible for the reporter on Windows 11
(0.18.0), with no way to tell whether Windows never offered the files or PhotoCraft
mishandled them. The app side checks out: winit's Windows backend (OLE IDropTarget,
CF_HDROP) emits DroppedFile, egui-winit puts it in raw.dropped_files, and a drop with no
document open or off the canvas opens like File > Open. What this changes:

- Routing is a pure, tested decision: `target_at` (tab strip / canvas / elsewhere, from
  what the last frame drew) and `DropTarget::route` (place vs open, presets always open).
  Tests cover several file types, no document, a stale canvas rectangle, covered pointer,
  multiple files and presets.
- A dropped folder is refused with "it is a folder, not a file" instead of Windows'
  "Access is denied" (or Place Embedded's error), and the other dropped files still go
  through.
- A drag over the window and a drop each log one info line (counts and target, never file
  names). A drag with neither line never reached PhotoCraft, which is how an elevated
  PhotoCraft (UIPI, see #8559) or a non-file drag source shows up in a bug report.
2026-11-01 19:28:47 +03:00
..
2026-10-31 04:25:34 +00:00