SDL/src
Sam Lantinga e778881ada Fixed bug 5449 - SDL_DROPFILE update mouse location of drop in Cocoa
Dominik Reichardt

Exult (http://exult.info) has an editor app that uses GTK+2. Up to now we were using X's drag'n'drop to allow dropping of assets from the editor onto Exult.
There is now an experimental branch that makes use of SDL_DROPFILE. That works under X, dropping in Exult's SDL2 window puts the asset right at the spot you dropped at.
On macOS with native Exult and Quartz GTK+2 this doesn't work, the location of the drop is where the mouse was last tracked before you left the window (usually one of the edges, unless you tabbed out).
All we tried out pointed to the fact that the location update needs to be done by the dropfile event in SDL2, not by our own (which always only worked after the Exult window getting focus).

This patch adds this to SDL_cocoawindow.m and it works perfectly, passing the correct coordinates to our code (SDL_GetMouseState()).
2021-01-07 11:49:28 -08:00
..
atomic Use specific acquire and release variants of InterlockedExchange on ARM 2021-01-03 12:13:40 -06:00
audio use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
core make ANSI/UNICODE versions of WIN??UTF8 macros individually available. 2021-01-04 10:00:10 +03:00
cpuinfo Updated copyright for 2021 2021-01-02 10:25:38 -08:00
dynapi ran gendynapi.pl after SDL_UpdateNVTexture addition 2021-01-05 15:15:50 +03:00
events Updated copyright for 2021 2021-01-02 10:25:38 -08:00
file Updated copyright for 2021 2021-01-02 10:25:38 -08:00
filesystem use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
haptic Updated copyright for 2021 2021-01-02 10:25:38 -08:00
hidapi Fixed building when SDL_LIBUSB_DYNAMIC is defined 2021-01-07 10:23:55 -08:00
joystick Fixed detection of the Wooting Two keyboard, which shows up as an Xbox 360 controller 2021-01-04 17:30:28 -08:00
libm Updated copyright for 2021 2021-01-02 10:25:38 -08:00
loadso Updated copyright for 2021 2021-01-02 10:25:38 -08:00
locale consistently use TEXT() macro with LoadLibrary() and GetModuleHandle() 2021-01-04 01:23:50 +03:00
main SDL_windows_main.c: use new WIN_StringToUTF8W macro 2021-01-04 10:20:10 +03:00
misc use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
power Updated copyright for 2021 2021-01-02 10:25:38 -08:00
render Fix D3D11 UpdateTextureNV in non fullscreen (bug #5430) 2021-01-05 22:06:51 +01:00
sensor use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
stdlib Updated copyright for 2021 2021-01-02 10:25:38 -08:00
test Updated copyright for 2021 2021-01-02 10:25:38 -08:00
thread use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
timer Updated copyright for 2021 2021-01-02 10:25:38 -08:00
video Fixed bug 5449 - SDL_DROPFILE update mouse location of drop in Cocoa 2021-01-07 11:49:28 -08:00
SDL.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_assert.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_assert_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_dataqueue.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_dataqueue.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_error.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_error_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hints.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hints_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_internal.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_log.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00