From 503d2954dd726a8f9febe6e0f04ef19ed84b3af4 Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Sat, 1 Mar 2025 12:27:08 -0500 Subject: [PATCH] Make Emacs respond to NS activation clicks * src/nsterm.m (acceptsFirstMouse): Opt into receiving mouse events that activate the window. (bug#76629) (cherry picked from commit 354598874061ab9ecb9362d7ac4233494b51252b) --- src/nsterm.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nsterm.m b/src/nsterm.m index a4398e79211..12141dfac44 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6820,6 +6820,13 @@ ns_create_font_panel_buttons (id target, SEL select, SEL cancel_action) return YES; } +/* Tell NS we want to accept clicks that activate the window */ +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent +{ + NSTRACE_MSG ("First mouse event: type=%ld, clickCount=%ld", + [theEvent type], [theEvent clickCount]); + return YES; +} - (void)resetCursorRects { NSRect visible = [self visibleRect]; -- 2.39.5