]> git.eshelyaron.com Git - emacs.git/commitdiff
Make Emacs respond to NS activation clicks
authorDaniel Colascione <dancol@dancol.org>
Sat, 1 Mar 2025 17:27:08 +0000 (12:27 -0500)
committerEshel Yaron <me@eshelyaron.com>
Tue, 4 Mar 2025 20:57:56 +0000 (21:57 +0100)
* src/nsterm.m (acceptsFirstMouse): Opt into receiving mouse events that
activate the window. (bug#76629)

(cherry picked from commit 354598874061ab9ecb9362d7ac4233494b51252b)

src/nsterm.m

index a4398e792111115f41054c65cc37d76a5231bc3c..12141dfac444fbdc657eacf055b0f10036511641 100644 (file)
@@ -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];