Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File drag&drop #98

Open
3 tasks
dhardy opened this issue Apr 29, 2020 · 1 comment
Open
3 tasks

File drag&drop #98

dhardy opened this issue Apr 29, 2020 · 1 comment

Comments

@dhardy
Copy link
Collaborator

dhardy commented Apr 29, 2020

File hover/drop:

  • determine coordinate (may be a little tricky since winit doesn't communicate whether the input source a mouse or touch event)
  • send FileHovered and FileDropped to the appropriate widget (including when moved over a new widget)
  • support grabs (include source to allow use of Manager::request_grab)

Currently, winit only reports HoveredFile once on hover-over-window start, HoveredFileCancelled when leaving the window, and DroppedFile when releasing. These include a path but nothing else. Additionally (at least on X11), the usual cursor and touch events are not received. It is therefore not possible to implement this over the current winit API. See rust-windowing/winit#1550

@dhardy dhardy mentioned this issue Apr 29, 2020
5 tasks
@dhardy
Copy link
Collaborator Author

dhardy commented Aug 2, 2021

Note: the cursor position should be received immediately after a drop ends which could be used to target the drop to a specific widget. This is hacky and incorrect for touchscreen drops (on platforms other than X11).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant