Open zbaylin opened 4 years ago
Awesome!
Just to solidify my understanding of the API:
When dragging n files, 1 BEGIN, n FILE and 1 COMPLETE events are sent per mouse movement.
Does this mean, for every mouse-move, we would get a BEGIN - FILE - COMPLETE set of events?
I wonder if we could simplify and just use a single event (either DRAGFILE
or DRAGTEXT
- containing the mouse coordinates) - and worry about the complete set of files once the 'DROP' occurs? Is there a use case for sending the full list of files for each drag-movement?
Trying to fix up the CI here: https://github.com/revery-ui/esy-sdl2/pull/14 - the 10.13
macOS image is no longer supported by Azure Pipelines. Also deleted the duplicate pipeline
Awesome!
Just to solidify my understanding of the API:
When dragging n files, 1 BEGIN, n FILE and 1 COMPLETE events are sent per mouse movement.
Does this mean, for every mouse-move, we would get a BEGIN - FILE - COMPLETE set of events?
I wonder if we could simplify and just use a single event (either
DRAGFILE
orDRAGTEXT
- containing the mouse coordinates) - and worry about the complete set of files once the 'DROP' occurs? Is there a use case for sending the full list of files for each drag-movement?
This is correct. I did this for two reasons:
.png
/.jpg
files. If you didn't carry the file names being dragged with you, there would be no way to visually identify that dragging, for instance a .gif
is unintended behavior.There are probably other reasons as well, but that was the main one I thought of. Let me know if you can think of a way around this -- I agree that it's pretty convoluted!
Cool, those seem like reasonable considerations to me - thanks Zach!
You might want to merge master
and I think the build should be green now. Otherwise, looks great!
Interestingly enough it looks like Wayland responds to all those X events I set up! So Linux is done in theory 😄
That's awesome, @zbaylin !
These closely mirror the Drop events, specifically with BEGIN and COMPLETE. When dragging n files, 1 BEGIN, n FILE and 1 COMPLETE events are sent per mouse movement.
Note that currently only the macOS implementation works, but the scaffolding is there for easy Windows/Linux additions!