diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-06-28 22:47:30 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-06-29 10:10:31 -0700 |
commit | 92157762cf501c9b96de2d1c6d384cb8633c554b (patch) | |
tree | 8c94312e0957bb6409d41705c2dacdb5d683012f /platform/macos/src | |
parent | ae7dc8ce48d7923a41abb79b4bd0b895e74196fe (diff) | |
download | qtlocation-mapboxgl-92157762cf501c9b96de2d1c6d384cb8633c554b.tar.gz |
[macos] Fixed cursor shifting after drag gesture
When redisplaying the mouse cursor after a modified drag gesture, incorporate the conversion from view coordinates to window coordinates. Previously, this code performed the conversion but threw away the results.
Fixes #8670.
Diffstat (limited to 'platform/macos/src')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 3e91a6c5a5..1908a46cf9 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1369,7 +1369,7 @@ public: // Move the cursor back to the start point and show it again, creating // the illusion that it has stayed in place during the entire gesture. CGPoint cursorPoint = [self convertPoint:startPoint toView:nil]; - cursorPoint = [self.window convertRectToScreen:{ startPoint, NSZeroSize }].origin; + cursorPoint = [self.window convertRectToScreen:{ cursorPoint, NSZeroSize }].origin; cursorPoint.y = self.window.screen.frame.size.height - cursorPoint.y; CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cursorPoint); CGDisplayShowCursor(kCGDirectMainDisplay); |