[Bf-blender-cvs] [cf9ea111bf4] master: macOS: remove deprecated touch event API call

Brecht Van Lommel noreply at git.blender.org
Wed Nov 4 16:07:42 CET 2020


Commit: cf9ea111bf48b500db59f800c49f88544873c4f7
Author: Brecht Van Lommel
Date:   Wed Nov 4 14:19:37 2020 +0100
Branches: master
https://developer.blender.org/rBcf9ea111bf48b500db59f800c49f88544873c4f7

macOS: remove deprecated touch event API call

Now that the minimum version is macOS 10.13, we can use the new API.

This reverts commit f97a64aa9b7b384f8221a1ef4f2eef9cde1238db.

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

M	intern/ghost/intern/GHOST_WindowCocoa.mm

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

diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index f8e2f96d111..ebc08fb411c 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -404,7 +404,7 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
   [m_window setAcceptsMouseMovedEvents:YES];
 
   NSView *contentview = [m_window contentView];
-  [contentview setAcceptsTouchEvents:YES];
+  [contentview setAllowedTouchTypes:(NSTouchTypeMaskDirect | NSTouchTypeMaskIndirect)];
 
   [m_window registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
                                                               NSStringPboardType,



More information about the Bf-blender-cvs mailing list