mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 06:53:59 +00:00
Fix a resizing issue with AWTGLCanvas on OS X
This commit is contained in:
parent
a7c704ae2f
commit
0c07657edf
1 changed files with 7 additions and 4 deletions
|
|
@ -109,10 +109,13 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle
|
|||
|
||||
// get root layer of the AWT Canvas and add self to it
|
||||
id <JAWT_SurfaceLayers> surfaceLayers = (id <JAWT_SurfaceLayers>)macosx_dsi;
|
||||
surfaceLayers.layer = self;
|
||||
|
||||
// ensure the CALayer size is correct, needed for Java 7+
|
||||
self.frame = CGRectMake(0, 0, [self getWidth], [self getHeight]);
|
||||
|
||||
if (surfaceLayers.layer != self) {
|
||||
surfaceLayers.layer = self;
|
||||
|
||||
// ensure the CALayer size is correct, needed for Java 7+
|
||||
self.frame = CGRectMake(0, 0, [self getWidth], [self getHeight]);
|
||||
}
|
||||
}
|
||||
|
||||
- (void) removeLayer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue