From: Daniel Colascione Date: Sat, 1 Mar 2025 17:27:08 +0000 (-0500) Subject: Make Emacs respond to NS activation clicks X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=503d2954dd726a8f9febe6e0f04ef19ed84b3af4;p=emacs.git 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) --- 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];