Skip to content

Commit

Permalink
[osx] Add mouse coordinates to os::Event::DropFiles event indicating …
Browse files Browse the repository at this point in the history
…the point where the drop of files took place on the target window
  • Loading branch information
martincapello committed Feb 27, 2024
1 parent a5561b2 commit 32557b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions os/osx/view.mm
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,9 @@ - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
NSArray* filenames = [pasteboard propertyListForType:NSFilenamesPboardType];

os::Event ev = generate_drop_files_from_nsarray(filenames);
ev.setPosition(gfx::Point(
sender.draggingLocation.x,
[sender.draggingDestinationWindow contentRectForFrameRect: sender.draggingDestinationWindow.frame].size.height - sender.draggingLocation.y));
[self queueEvent:ev];
return YES;
}
Expand Down

0 comments on commit 32557b8

Please sign in to comment.