Revert "Fix OS X CALayer positioning and workaround Java 7 bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7172187"
This reverts commit 1cceacb3cd
.
This commit is contained in:
parent
1cceacb3cd
commit
5628e751bf
|
@ -113,9 +113,8 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle
|
|||
if (surfaceLayers.layer != self) {
|
||||
surfaceLayers.layer = self;
|
||||
|
||||
// ensure the CALayer size and position is correct, needed for Java 7+
|
||||
self.bounds = CGRectMake(0, 0, [self getWidth], [self getHeight]);
|
||||
self.position = CGPointMake([self getWidth]+[self getWidth]/2.0, [self getHeight]+[self getHeight]/2.0);
|
||||
// ensure the CALayer size is correct, needed for Java 7+
|
||||
self.frame = CGRectMake(0, 0, [self getWidth], [self getHeight]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,9 +136,8 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle
|
|||
}
|
||||
|
||||
- (void)setNeedsLayout {
|
||||
// make sure the CALayer remains in correct location during resize
|
||||
self.bounds = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
|
||||
self.position = CGPointMake(self.superlayer.position.x, self.superlayer.position.y);
|
||||
// make sure the CALayer remains in bottom corner during resize
|
||||
self.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
|
||||
}
|
||||
|
||||
- (int) getWidth {
|
||||
|
|
Loading…
Reference in New Issue