-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Known][Waiting] Drag and Drop files doesn't work on Linux #6085
Comments
Is there any know work around for this please |
Fwiw I've had a crack at this today. I did have some limited success in implementing the "Connect" callback, but couldn't seem to wire everything up completely. I don't think it will be too bad - given a lot of the boilerplate is already there. However, I was basically hacking away at stuff by spawning a function to "RunOnGlibThread" on the MainWindow, and trying to stuff it all in there as a PoC... and it all just felt incredibly dirty and hacky, and I figure it is best to leave it to those who actually know what they're doing. It would be really nice to get this sorted though, so we have all 3 platforms working with drag and drop. I've attached a really simple python script which I was using on KDE/Wayland with success to demo the APIs in use. There's no way I'd be able to take it further than this though, as I just don't have the skillset to sort it, sorry.
|
Lack of drag drop on linux is actually a surprise for me. I thought it's done long ago. I think that this feature is mandatory. Priority is the same as clipboard support. |
Still no drag and drop support on Linux!? It's a fairly basic feature, although perhaps not trivial to implement... Still, perhaps it would be better to say "limited Linux support" and list the limitations since Avalonia is touted as a "cross-platform UI framework" with no mention that Windows is the primary platform, and the support for the other platforms vary. Still very cool and very useful, but this is a bit of a disappointment and it comes after investing quite a bit into it just to realize that there's no drag and drop on Linux, and doesn't appear to be a very high priority either. The original post here is now over 2 years old... (Also, it can be noted slightly off-topic that copy/paste support is also sketchy on macOS and Linux and needs a bit of client OS-dependent code to work around the limitations, but at least it's possible to make it work with reasonable effort) |
@xecrets I understand your needs, but the thing is that Linux has several different window managers, all working differently. We are still trying to figure out a proper API for it. #11011 As the issue is labeled with help-wanted, if you or anyone else want to take a look into providing DnD support, a PR is welcome. |
@timunie - Thanks for explaining. I do realize there's a challenge, and would love to contribute - but it's simply way above my pay-grade to write Linux-specific implementations of this sort, for perhaps also three window managers too to boot! I have considered it, especially for the somewhat related issue of copy/paste, where more of the scaffolding seems to be in place. But then again, I really have no idea of how the different window managers differ. As the issue is indeed non-trivial, and it's likely to take some time, it would be nice if the documentation would mention supported platforms, and if there was like a table of what feature groups are supported on what platforms. As the number of platforms increase, I'm guessing this will become even more valuable. For now, I've implemented OS-specific wrappers of |
No. This exactly allows us to improve / implement it without breaking changes. If we would have make it implementable, we couldn't add it during 11.x timeframe. I also think if someone wants to implement it, Avalonia should be fixed. Not a hack-fix in the App. |
I looked into how X11 Drag & Drop (XDND) could be added into Avalonia. The current IDataObject interface critically assumes that The workaround I could think off here is to assume that the library user just accepts the known mime type, request it, receive the contents and only then emit the event. |
The current IDataObject was copy-pasted from WPF without any thought about X11 and it got merged because we didn't have "the proposed API needs to be supported across all platforms before merging" policy back in the day. My current idea about fixing the mess is to have a dedicated X11 thread just for clipboard and DND. |
If someone is still interested in this topic, I found this on the avalonia docs that does not allow to drag and drop things but at least permits to import a specified file. |
Same here. We implemented Drag&Drop support for our application and later we noticed it's not working for the Linux platform. I hope it's implemented soon. |
Is there any progress/status update on this? Drag-n-Drop still seems to be missing today for Linux, which is not great for UX for many apps. |
@HookedBehemoth Avalonia is not a member of .Net foundation anymore, is there any chance you could change your mind and resubmit your PR. |
Similar to dan0v/xdelta3-cross-gui#2
The drag and drop (files/folder) from Files window to the app doesn't work on Linux. It works normally on Windows and MacOS.
The text was updated successfully, but these errors were encountered: