| Summary: | SDL_DROPFILE event doesn't work | ||
|---|---|---|---|
| Product: | SDL | Reporter: | mbresson |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | HG 2.0 | Keywords: | target-2.0.0 |
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
The code I have used to test SDL_DROPFILE
patch for dropfile support on Microsoft Windows |
||
Dropping files seems currently only implemented for Cocoa. You can check this by searching for SDL_SendDropFile in the SDL source code itself. (In reply to comment #1) > Dropping files seems currently only implemented for Cocoa. You can check this > by searching for SDL_SendDropFile in the SDL source code itself. Thank you. Created attachment 962 [details]
patch for dropfile support on Microsoft Windows
I attached a patch which tries to implement the dropfile support for Microsoft Windows. If applied SDL_DROPFILE events should be sent for single or multiple files which are dropped on window.
The handling on Windows side is always activated (cursor will change and so on) because there is no connection between SDL_EventState() and the window setup. I assumed this additional overhead would be small and can be ignored.
Thanks Philipp, your patch is applied: http://hg.libsdl.org/SDL/rev/62d0193a7a02 FYI, for anyone who has time to take a crack at the X11 DnD protocol, here's a good example of it's use: http://www.edwardrosten.com/code/dist/x_clipboard-1.1/paste.cc (Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.0, Priority 2. This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan. It was implemented for X11 in March 2013: https://hg.libsdl.org/SDL/rev/ccc0d3207639 |
Created attachment 943 [details] The code I have used to test SDL_DROPFILE Hello, I have tried to use SDL_DROPFILE, but even with SDL_EventState(SDL_DROPFILE, SDL_ENABLE); the SDL_DROPFILE event is not issued when I try to drop any kind of file on the window. I have latest SDL, compiled one week ago. I am running Archlinux x86_64 with xserver 1.12.4 and Xfce 4.10. Ask me if you need more information.