From fbac578c79168373d4037ada2bc3afb6f9f1bdee Mon Sep 17 00:00:00 2001 From: Mike Maraya Date: Fri, 27 Jun 2014 23:26:09 -0400 Subject: [PATCH 1/3] Fixes resizeWindow() on OS X (Bug #3200) --- modules/highgui/src/window_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 56683e6d112a808fbd51c74917f0c4d9d752f502 Mon Sep 17 00:00:00 2001 From: Mike Maraya Date: Fri, 27 Jun 2014 08:02:01 -0400 Subject: [PATCH 2/3] Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737) --- modules/highgui/src/window_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_cocoa.mm b/modules/highgui/src/window_cocoa.mm index 03b144f3a5..433e437a77 100644 --- a/modules/highgui/src/window_cocoa.mm +++ b/modules/highgui/src/window_cocoa.mm @@ -151,7 +151,7 @@ CV_IMPL int cvInitSystem( int , char** ) #define NSAppKitVersionNumber10_5 949 #endif if( floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5 ) - [application setActivationPolicy:0/*NSApplicationActivationPolicyRegular*/]; + [application setActivationPolicy:NSApplicationActivationPolicyRegular]; #endif //[application finishLaunching]; //atexit(icvCocoaCleanup); From 5c85f816c9da66c203034f9ab32bd1e8e7a12727 Mon Sep 17 00:00:00 2001 From: Mike Maraya Date: Fri, 27 Jun 2014 08:20:22 -0400 Subject: [PATCH 3/3] Revert "Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737)" This reverts commit 56683e6d112a808fbd51c74917f0c4d9d752f502. --- modules/highgui/src/window_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_cocoa.mm b/modules/highgui/src/window_cocoa.mm index 433e437a77..03b144f3a5 100644 --- a/modules/highgui/src/window_cocoa.mm +++ b/modules/highgui/src/window_cocoa.mm @@ -151,7 +151,7 @@ CV_IMPL int cvInitSystem( int , char** ) #define NSAppKitVersionNumber10_5 949 #endif if( floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5 ) - [application setActivationPolicy:NSApplicationActivationPolicyRegular]; + [application setActivationPolicy:0/*NSApplicationActivationPolicyRegular*/]; #endif //[application finishLaunching]; //atexit(icvCocoaCleanup);