From cc621765e5e9a5ef258a05ccf070e8c1603a7b6f Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 24 Nov 2018 09:38:07 -0500 Subject: [PATCH] Cocoa: Accept focusing mouse click as input This makes the behavior on macOS consistent with other platforms. Fixes #1209. Closes #1386. --- src/cocoa_window.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 0a0da8c0..217588f7 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -492,6 +492,11 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; updateCursorImage(window); } +- (BOOL)acceptsFirstMouse:(NSEvent *)event +{ + return YES; +} + - (void)mouseDown:(NSEvent *)event { _glfwInputMouseClick(window,