diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2010-03-28 23:42:08 +0400 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2010-03-28 23:42:08 +0400 |
commit | dc4ac8a263dae68f2563c44c4b6a44944f0053fe (patch) | |
tree | b51814143bee38315bdf9977fcd00547e82a1a58 /intern | |
parent | 751a9975e4c633e1ea8818c1f2f07fd6020c0ec0 (diff) |
Fix [#21689] for coordinate issue (y flipped) when setting mouse cursor position
Mem leak when using BGE fixed too.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 20d5cc7165a..b66b1e4033d 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -813,6 +813,7 @@ GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow(); if (!window) return GHOST_kFailure; + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSScreen *windowScreen = window->getScreen(); NSRect screenRect = [windowScreen frame]; @@ -825,6 +826,7 @@ GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 CGDisplayMoveCursorToPoint((CGDirectDisplayID)[[[windowScreen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue], CGPointMake(xf, yf)); + [pool drain]; return GHOST_kSuccess; } |