Hand the drag ghost to the renderer through a file, so it draws

The bitmap under the cursor was a solid red rectangle. Slint's drag
overlay uploads the image as a texture, draws it and drops the texture in
one call; with the wgpu FemtoVG renderer the drop is immediate and the
draw is deferred to the flush, so the frame binds femtovg's placeholder —
which is red. An image with a cache key survives in the texture cache
until after the flush, and only a path gives one. So the composite goes
to the data directory's scratch as a PNG and comes back through
load_from_path; one file per drag, removed when the drag ends. A
workaround for Slint 1.17.1, written up as one beside the code.
This commit is contained in:
2026-09-20 15:58:44 +02:00
parent 08727cff5a
commit 6507593715
6 changed files with 136 additions and 30 deletions
Generated
+1
View File
@@ -1706,6 +1706,7 @@ dependencies = [
"jni 0.22.4",
"log",
"ndk-context",
"png",
"pollster",
"reqwest",
"rusqlite",