diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-25 00:17:22 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-25 13:33:11 -0800 |
commit | 1b6a4c60d709decfdc59d5a4c2a9fb6c953a9d6b (patch) | |
tree | 694fff4a2d169db5410bc0c4287adf3ef854ff74 /platform/macos/src/MGLMapView.mm | |
parent | 0a8cfdd593dc22fc0d48386608347d531971ff39 (diff) | |
download | qtlocation-mapboxgl-1b6a4c60d709decfdc59d5a4c2a9fb6c953a9d6b.tar.gz |
[macos] Distinguish between screens
Fixed an issue causing the mouse cursor to jump after shift- or option-dragging a map view if the window opened on a screen with a different size than the screen with keyboard focus.
Diffstat (limited to 'platform/macos/src/MGLMapView.mm')
-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 2b0d5f4bc8..4e8f3c2b88 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1339,7 +1339,7 @@ public: // 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.y = [NSScreen mainScreen].frame.size.height - cursorPoint.y; + cursorPoint.y = self.window.screen.frame.size.height - cursorPoint.y; CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cursorPoint); CGDisplayShowCursor(kCGDirectMainDisplay); } |