fix CALayer/Display.setParent driver crash on resize

This commit is contained in:
kappaOne 2013-02-17 15:09:31 +00:00
parent 6663ee037c
commit af1ae935d8
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ static MacOSXPeerInfo *peer_info;
if (window_info->parented) {
if (peer_info->isCALayer) {
window_info->window = [[MacOSXKeyableWindow alloc] initWithContentRect:window_info->display_rect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
window_info->window = [[MacOSXKeyableWindow alloc] initWithContentRect:[[NSScreen mainScreen] frame] styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
[window_info->window setContentView:window_info->view];
}
else {

View file

@ -159,7 +159,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle
// set the size of the offscreen frame buffer window
window_info->display_rect = NSMakeRect(0, 0, width, height);
[window_info->window setFrame:window_info->display_rect display:false];
//[window_info->window setFrame:window_info->display_rect display:false];
// clean up the old fbo and renderBuffers
glDeleteFramebuffersEXT(1, &oldFboID);