diff --git a/modules/highgui/src/window_cocoa.mm b/modules/highgui/src/window_cocoa.mm index 5800ab3f94..5e34b502db 100644 --- a/modules/highgui/src/window_cocoa.mm +++ b/modules/highgui/src/window_cocoa.mm @@ -197,7 +197,7 @@ CV_IMPL void cvDestroyWindow( const char* name) if(window) { if ([window styleMask] & NSFullScreenWindowMask) { [window toggleFullScreen:nil]; - } + } [window close]; [windows removeObjectForKey:[NSString stringWithFormat:@"%s", name]]; } @@ -731,7 +731,7 @@ void cvSetModeWindow_COCOA( const char* name, double prop_value ) } localpool = [[NSAutoreleasePool alloc] init]; - + // std::cout << "setting mode" << std::endl; #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6 if ( ([window styleMask] & NSFullScreenWindowMask) && prop_value==CV_WINDOW_NORMAL ) @@ -746,11 +746,11 @@ void cvSetModeWindow_COCOA( const char* name, double prop_value ) // std::cout << "entering fullscreen" << std::endl; [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; - NSScreen* screen = [window screen]; + NSScreen* screen = [window screen]; NSRect frame = [screen frame]; [window setFrame:frame display:YES]; - + [window setContentSize:frame.size]; [window toggleFullScreen:nil];