From 84ddb8b3cc9989c2d5569bf2fa381a585f99d20f Mon Sep 17 00:00:00 2001 From: recht Van Lommel Date: Mon, 26 Sep 2022 22:56:14 +0200 Subject: UI: add preference to disable touchpad multitouch gestures Available on Windows and macOS, where such gestures are supported. For Windows, disabling this option restores touchpad behavior to match Blender 3.2. Ref T97925 Differential Revision: https://developer.blender.org/D16005 --- source/blender/windowmanager/WM_api.h | 2 +- source/blender/windowmanager/intern/wm_files.c | 4 ++-- source/blender/windowmanager/intern/wm_window.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 775b62e7d39..5b6f7939ab9 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -94,7 +94,7 @@ void WM_init_state_maximized_set(void); void WM_init_state_start_with_console_set(bool value); void WM_init_window_focus_set(bool do_it); void WM_init_native_pixels(bool do_it); -void WM_init_tablet_api(void); +void WM_init_input_devices(void); /** * Initialize Blender and load the startup file & preferences diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 6216cd87e70..92844dddf4c 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -462,8 +462,8 @@ static void wm_init_userdef(Main *bmain) /* Update the temporary directory from the preferences or fallback to the system default. */ BKE_tempdir_init(U.tempdir); - /* Update tablet API preference. */ - WM_init_tablet_api(); + /* Update input device preference. */ + WM_init_input_devices(); BLO_sanitize_experimental_features_userpref_blend(&U); } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 85e1227ab73..89bf2b82426 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -2006,12 +2006,14 @@ void WM_init_native_pixels(bool do_it) /** \name Cursor API * \{ */ -void WM_init_tablet_api(void) +void WM_init_input_devices(void) { if (UNLIKELY(!g_system)) { return; } + GHOST_SetMultitouchGestures(g_system, (U.uiflag & USER_NO_MULTITOUCH_GESTURES) == 0); + switch (U.tablet_api) { case USER_TABLET_NATIVE: GHOST_SetTabletAPI(g_system, GHOST_kTabletWinPointer); -- cgit v1.2.3