There's something I'm trying to get working in Jetpack Compose, specifically for the desktop version of my app.
I have drag and drop somewhat working inside the app, and I have a view of what's being dragged when you're inside the app. But the way it's done is by rendering an overlay. So what happens is this:
I had a bit of a hunt around and found Modifier.pointerHoverIcon
which could might allow me to modify the pointer itself so that the content can render outside the frame, but even that will only work when the pointer is hovering over my window.
Native drag and drop seems to attach something to the cursor so that it appears even when the content is dragged outside the application. I've never had to write a toolkit myself so I don't know what technique is being used to do this. Maybe it's still just modifying the cursor but doing it in a way that allows the effect to persist outside the window? Or maybe it's creating a new window with the content in it and somehow tracking the cursor? Or maybe it's some other completely native API for adding drag content to a cursor...
What is the best way to go about this?
Incidentally, I know I can do this using a Swing component - but I'm trying to avoid using Swing if at all possible.