diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 6076e4de4..0c2d2bcae 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -161,6 +161,16 @@ SDL_assert([desiredType isEqualToString:NSFilenamesPboardType]); NSArray *array = [pasteboard propertyListForType:@"NSFilenamesPboardType"]; + /* Code addon to update the mouse location */ + NSPoint point = [sender draggingLocation]; + SDL_Mouse *mouse = SDL_GetMouse(); + int x = (int)point.x; + int y = (int)(sdlwindow->h - point.y); + if (x >= 0 && x < sdlwindow->w && y >= 0 && y < sdlwindow->h) { + SDL_SendMouseMotion(sdlwindow, mouse->mouseID, 0, x, y); + } + /* Code addon to update the mouse location */ + for (NSString *path in array) { NSURL *fileURL = [NSURL fileURLWithPath:path]; NSNumber *isAlias = nil;