Fix incoming drag drop location on macOS

This commit is contained in:
Wojtek Figat
2023-07-21 13:35:21 +02:00
parent fa77a52a2c
commit bd750d2634

View File

@@ -202,8 +202,7 @@ void GetDragDropData(const MacWindow* window, id<NSDraggingInfo> sender, Float2&
{
NSRect frame = [(NSWindow*)window->GetNativePtr() frame];
NSPoint point = [sender draggingLocation];
Float2 titleSize = GetWindowTitleSize(window);
mousePos = Float2(point.x, frame.size.height - point.y) - titleSize;
mousePos = Float2(point.x, frame.size.height - point.y) * MacPlatform::ScreenScale - GetWindowTitleSize(window);
NSPasteboard* pasteboard = [sender draggingPasteboard];
if ([[pasteboard types] containsObject:NSPasteboardTypeString])
{