From db71a10b29d9b929d72c19eb3d09da45387fc0e3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Nov 2017 17:27:42 +0100 Subject: [PATCH] Set rotation angle for the initial rotate gesture event in MSW According to MSDN, for the initial rotation even the angle is just passed directly, so use it. --- src/msw/window.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 58aed9f66a..bbf245837f 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -5742,7 +5742,11 @@ bool wxWindowMSW::HandleRotateGesture(int x, int y, // wxEVT_GESTURE_ROTATE wxRotateGestureEvent event(GetId()); - if ( !InitGestureEvent(event, x, y, flags) ) + if ( InitGestureEvent(event, x, y, flags) ) + { + event.SetRotationAngle(angleArgument); + } + else // Not the first event. { // Use angleArgument to obtain the cumulative angle since the gesture // was first started. This angle is in radians and MSW returns negative