Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYevgeny Makarov <jenkm>2020-01-28 13:29:38 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-28 13:35:18 +0300
commit773beec541474616eda18583567c9934745c71ba (patch)
tree2bb1f0cd585ccb8395517a295d69d3c73ca2f7d4 /source/blender/windowmanager/wm_event_types.h
parent92d606ba268f5172228a19d5614298e7cf387714 (diff)
macOS: add trackpad smart zoom event support
This is done with two-finger double tap on trackpads, and is usually used to zoom into an element under the cursor. It can now be used for toggling local view in the 3D viewport. Differential Revision: https://developer.blender.org/D6588
Diffstat (limited to 'source/blender/windowmanager/wm_event_types.h')
-rw-r--r--source/blender/windowmanager/wm_event_types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index 252eb9673ae..ebb0d7dd878 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -63,6 +63,8 @@ enum {
MOUSEPAN = 0x000e,
MOUSEZOOM = 0x000f,
MOUSEROTATE = 0x0010,
+ MOUSESMARTZOOM = 0x0017,
+
/* defaults from ghost */
WHEELUPMOUSE = 0x000a,
WHEELDOWNMOUSE = 0x000b,
@@ -359,7 +361,8 @@ enum {
(((event_type) >= LEFTCTRLKEY && (event_type) <= LEFTSHIFTKEY) || (event_type) == OSKEY)
/* test whether the event is a mouse button */
-#define ISMOUSE(event_type) ((event_type) >= LEFTMOUSE && (event_type) <= BUTTON7MOUSE)
+#define ISMOUSE(event_type) \
+ (((event_type) >= LEFTMOUSE && (event_type) <= BUTTON7MOUSE) || (event_type) == MOUSESMARTZOOM)
#define ISMOUSE_WHEEL(event_type) ((event_type) >= WHEELUPMOUSE && (event_type) <= WHEELOUTMOUSE)
#define ISMOUSE_GESTURE(event_type) ((event_type) >= MOUSEPAN && (event_type) <= MOUSEROTATE)