-
Notifications
You must be signed in to change notification settings - Fork 920
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
Add a way to create drag-and-drop source #3229
Comments
I don't think that's how it works? Maybe it's like that on macOS though, but I don't think it's how it's done in general. if you're talking about firefox like tab dragging. |
It usually works with the help of Drag and Drop and you get notified that you dropped a window into another window by that basically. You also need to create a drag with some handle identifying your window. |
That's exactly what I'm talking about - detaching a tab into a new window, then drag it back to the original window again. |
Yeah, you need drag and drop for that. |
Thanks - I renamed the issue accordingly! |
I'm impressed that we don't have issue to create drag and drop source. |
Just in general, winit needs a way to create drag and drop sources, then you'll natively get a notification that you've dropped something into window Y, then by determining what you've dropped you perform an action. Let's say you define that DND source is of mime type You can also use that to move view out of a window(creating a new window for it), etc. |
The issue with all of that is that winit needs clipboard first, because DND sources are basically the same thing with a bit of extra as setting a custom surface along the drag and drop (you can draw a window preview there). But fundamentally it's the same things. |
I want something likewindow.is_dragged()
to check if a window is being dragged.The use-case I want to support is docking of window: I want to check if one winit window is being dragged onto another winit window, and if so collapse one into the other.
The text was updated successfully, but these errors were encountered: