From dc4ac8a263dae68f2563c44c4b6a44944f0053fe Mon Sep 17 00:00:00 2001 From: Damien Plisson Date: Sun, 28 Mar 2010 19:42:08 +0000 Subject: Fix [#21689] for coordinate issue (y flipped) when setting mouse cursor position Mem leak when using BGE fixed too. --- intern/ghost/intern/GHOST_SystemCocoa.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern') 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; } -- cgit v1.2.3