diff options
author | Sven Gothel <[email protected]> | 2012-02-13 14:27:53 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-02-13 14:27:53 +0100 |
commit | be91765959db646cca0b03537f140da9fecd7450 (patch) | |
tree | 211429df09b040018641b45751d0e721c716d330 /src/nativewindow/native | |
parent | f2bc8fe1f93b5a112093d9507bdb397e3b390215 (diff) |
OSX CALayer fix for Java7 (force CALayer to 0/0, always remove all animations)
Diffstat (limited to 'src/nativewindow/native')
-rw-r--r-- | src/nativewindow/native/macosx/OSXmisc.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index eec9b2a01..38ffde98b 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -242,6 +242,9 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_CreateCALayer0 lRect.size.width = 32; lRect.size.height = 32; [layer setFrame: lRect]; + // no animations for add/remove/swap sublayers etc + // doesn't work: [layer removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition] + [layer removeAllAnimations]; DBG_PRINT("CALayer::CreateCALayer.1: %p %lf/%lf %lfx%lf\n", layer, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height); DBG_PRINT("CALayer::CreateCALayer.X: %p (refcnt %d)\n", layer, (int)[layer retainCount]); @@ -265,7 +268,7 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AddCASublayer0 CGRect lRectRoot = [rootLayer frame]; DBG_PRINT("CALayer::AddCASublayer0.0: Origin %p frame0: %lf/%lf %lfx%lf\n", rootLayer, lRectRoot.origin.x, lRectRoot.origin.y, lRectRoot.size.width, lRectRoot.size.height); - if(lRectRoot.origin.x<0 || lRectRoot.origin.y<0) { + if(lRectRoot.origin.x!=0 || lRectRoot.origin.y!=0) { lRectRoot.origin.x = 0; lRectRoot.origin.y = 0; [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ |