SDL_DROPFILE mouse location on SDL window on macOS

Exult ( 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).

We’ve created a patch for SDL_cocoawindow.m and added this to issue

But I wanted to make sure with you all whether we are doing it wrong somehow :slight_smile:
Our code is at