diff options
author | Yevgeny Makarov <jenkm> | 2020-11-09 14:26:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-11-09 15:51:08 +0300 |
commit | 055ed335a111bebed7193acd083f54d5c82929ff (patch) | |
tree | 2d36a6ea151c60eb53cd2a7dfb4a398df0b2f8d9 /source/blender/editors/interface | |
parent | 0c4d12986a746b644c177224e4f70edec1f50d7a (diff) |
macOS: follow system preference for natural trackpad scroll direction
And remove Blender preference, which was expected to be set to match the system
preference for correct behavior. Instead just handle this automatically.
Differential Revision: https://developer.blender.org/D9402
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index fb5844d24f3..af71306cc3b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -504,7 +504,7 @@ bool ui_but_is_editing(const uiBut *but) void ui_pan_to_scroll(const wmEvent *event, int *type, int *val) { static int lastdy = 0; - int dy = event->prevy - event->y; + int dy = WM_event_absolute_delta_y(event); /* This event should be originally from event->type, * converting wrong event into wheel is bad, see T33803. */ @@ -518,10 +518,6 @@ void ui_pan_to_scroll(const wmEvent *event, int *type, int *val) lastdy += dy; if (abs(lastdy) > (int)UI_UNIT_Y) { - if (U.uiflag2 & USER_TRACKPAD_NATURAL) { - dy = -dy; - } - *val = KM_PRESS; if (dy > 0) { |