[Bf-blender-cvs] [2dab4393b08] master: macOS: Allow NSView subclasses to accept first mouse event.

Stefan Werner noreply at git.blender.org
Mon Oct 28 22:19:05 CET 2019


Commit: 2dab4393b08eddb7dba3c876756fea3bd6235cfb
Author: Stefan Werner
Date:   Mon Oct 28 22:19:00 2019 +0100
Branches: master
https://developer.blender.org/rB2dab4393b08eddb7dba3c876756fea3bd6235cfb

macOS: Allow NSView subclasses to accept first mouse event.

This brings the behavior in line with Windows and Linux. Going between
multiple windows now doesn't use the first click only to change focus
but also allows Blender to process those events.

===================================================================

M	intern/ghost/intern/GHOST_WindowViewCocoa.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowViewCocoa.h b/intern/ghost/intern/GHOST_WindowViewCocoa.h
index 9ed339c9992..cee40924b73 100644
--- a/intern/ghost/intern/GHOST_WindowViewCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowViewCocoa.h
@@ -58,6 +58,11 @@
   return YES;
 }
 
+- (BOOL)acceptsFirstMouse:(NSEvent *)event
+{
+  return YES;
+}
+
 // The trick to prevent Cocoa from complaining (beeping)
 - (void)keyDown:(NSEvent *)event
 {



More information about the Bf-blender-cvs mailing list