From a08eb9cd8a7f26d8206f41b9367e9121dad6e804 Mon Sep 17 00:00:00 2001 From: R cqls Date: Thu, 18 Feb 2021 08:40:43 +0100 Subject: [PATCH] sokol: fix dragging events on macos in sokol_app.h (#8817) --- thirdparty/sokol/sokol_app.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thirdparty/sokol/sokol_app.h b/thirdparty/sokol/sokol_app.h index b7c45142ce..4cdfb98162 100644 --- a/thirdparty/sokol/sokol_app.h +++ b/thirdparty/sokol/sokol_app.h @@ -3099,14 +3099,14 @@ _SAPP_OBJC_RELEASE( menu_bar ); _sapp.mouse.dy = [event deltaY]; } // QTODO hack INVALID=>MIDDLE macos bug - _sapp_macos_mouse_event(SAPP_EVENTTYPE_MOUSE_MOVE, SAPP_MOUSEBUTTON_MIDDLE , _sapp_macos_mod(event.modifierFlags)); + _sapp_macos_mouse_event(SAPP_EVENTTYPE_MOUSE_MOVE, SAPP_MOUSEBUTTON_LEFT , _sapp_macos_mod(event.modifierFlags)); } - (void)rightMouseDragged:(NSEvent*)event { if (_sapp.mouse.locked) { _sapp.mouse.dx = [event deltaX]; _sapp.mouse.dy = [event deltaY]; } - _sapp_macos_mouse_event(SAPP_EVENTTYPE_MOUSE_MOVE, SAPP_MOUSEBUTTON_INVALID, _sapp_macos_mod(event.modifierFlags)); + _sapp_macos_mouse_event(SAPP_EVENTTYPE_MOUSE_MOVE, SAPP_MOUSEBUTTON_RIGHT, _sapp_macos_mod(event.modifierFlags)); } - (void)scrollWheel:(NSEvent*)event { if (_sapp_events_enabled()) {