summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorKostadin Damyanov <maxmight@gmail.com>2015-06-26 21:35:47 +0300
committerKostadin Damyanov <maxmight@gmail.com>2015-06-26 21:35:47 +0300
commite0e54ea7d456c0fabd8f3f9b2667a69ff520f852 (patch)
tree9ce4e0b6db40ac2ab07b8582e57282fe63130165 /platform
parentf61eb5fd8e13642c82364f8ee66a0f6c791a4511 (diff)
parenta67486a39ee629acac068a6d014015944cf83bb3 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'platform')
-rw-r--r--platform/osx/os_osx.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index e2ff8d1116..72699366c4 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1113,7 +1113,9 @@ void OS_OSX::warp_mouse_pos(const Point2& p_to) {
NSPoint localPoint = { p_to.x, p_to.y };
NSPoint pointInWindow = [window_view convertPoint:localPoint toView:nil];
- NSPoint pointOnScreen = [[window_view window] convertRectToScreen:(NSRect){.origin=pointInWindow}].origin;
+ NSRect pointInWindowRect;
+ pointInWindowRect.origin = pointInWindow;
+ NSPoint pointOnScreen = [[window_view window] convertRectToScreen:pointInWindowRect].origin;
//point in scren coords
CGPoint lMouseWarpPos = { pointOnScreen.x, pointOnScreen.y};