Backends: Metal: Align code more closely with other backends. OSX: Add missing return for mouse pos events.

'#if __has_feature(objc_arc)' was removed as callback gets required reference via ImGui_ImplMetal_GetBackendData() so that weakref is not really needed.
This commit is contained in:
rokups
2022-05-04 16:29:07 +03:00
committed by ocornut
parent 55f8989392
commit d768b8c812
3 changed files with 207 additions and 261 deletions

View File

@ -620,6 +620,7 @@ static bool ImGui_ImplOSX_HandleEvent(NSEvent* event, NSView* view)
mousePoint = [view convertPoint:mousePoint fromView:nil];
mousePoint = NSMakePoint(mousePoint.x, view.bounds.size.height - mousePoint.y);
io.AddMousePosEvent((float)mousePoint.x, (float)mousePoint.y);
return io.WantCaptureMouse;
}
if (event.type == NSEventTypeScrollWheel)