diff --git a/modules/highgui/src/window_cocoa.mm b/modules/highgui/src/window_cocoa.mm index d3a68107fc..03b144f3a5 100644 --- a/modules/highgui/src/window_cocoa.mm +++ b/modules/highgui/src/window_cocoa.mm @@ -253,7 +253,7 @@ CV_IMPL void cvResizeWindow( const char* name, int width, int height) //cout << "cvResizeWindow" << endl; NSAutoreleasePool* localpool = [[NSAutoreleasePool alloc] init]; CVWindow *window = cvGetWindow(name); - if(window) { + if(window && ![window autosize]) { NSRect frame = [window frame]; frame.size.width = width; frame.size.height = height;