--- a/cmake/OpenCVFindLibsGUI.cmake +++ b/cmake/OpenCVFindLibsGUI.cmake 2024-09-02 12:52:38.000000000 +0800 @@ -89,6 +89,6 @@ # --- Cocoa --- if(APPLE) if(NOT IOS AND CV_CLANG) - set(HAVE_COCOA YES) +# set(HAVE_COCOA YES) endif() endif() --- a/modules/highgui/CMakeLists.txt 2021-12-25 11:53:27.000000000 +0800 +++ b/modules/highgui/CMakeLists.txt 2026-02-18 19:55:32.000000000 +0800 @@ -143,11 +143,6 @@ message(STATUS " ${name}: Removing 'comctl32.lib, gdi32.lib, ole32.lib, setupapi.lib'") message(STATUS " ${name}: Leaving '${HIGHGUI_LIBRARIES}'") endif() -elseif(HAVE_COCOA) - set(OPENCV_HIGHGUI_BUILTIN_BACKEND "COCOA") - add_definitions(-DHAVE_COCOA) - list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_cocoa.mm) - list(APPEND HIGHGUI_LIBRARIES "-framework Cocoa") endif() if(TARGET ocv.3rdparty.win32ui) --- a/modules/highgui/src/window.cpp 2021-12-25 11:53:27.000000000 +0800 +++ b/modules/highgui/src/window.cpp 2026-02-18 19:54:55.000000000 +0800 @@ -228,8 +228,6 @@ cvSetModeWindow_W32(name,prop_value); #elif defined (HAVE_GTK) cvSetModeWindow_GTK(name,prop_value); - #elif defined (HAVE_COCOA) - cvSetModeWindow_COCOA(name,prop_value); #elif defined (WINRT) cvSetModeWindow_WinRT(name, prop_value); #endif @@ -253,8 +251,6 @@ // nothing #elif defined(HAVE_WIN32UI) cvSetPropTopmost_W32(name, (prop_value != 0 ? true : false)); - #elif defined(HAVE_COCOA) - cvSetPropTopmost_COCOA(name, (prop_value != 0 ? true : false)); #endif break; @@ -313,8 +309,6 @@ return cvGetModeWindow_W32(name); #elif defined (HAVE_GTK) return cvGetModeWindow_GTK(name); - #elif defined (HAVE_COCOA) - return cvGetModeWindow_COCOA(name); #elif defined (WINRT) return cvGetModeWindow_WinRT(name); #else @@ -376,8 +370,6 @@ return -1; #elif defined(HAVE_WIN32UI) return cvGetPropTopmost_W32(name); - #elif defined(HAVE_COCOA) - return cvGetPropTopmost_COCOA(name); #else return -1; #endif @@ -432,8 +424,6 @@ return cvGetWindowRect_W32(winname.c_str()); #elif defined (HAVE_GTK) return cvGetWindowRect_GTK(winname.c_str()); - #elif defined (HAVE_COCOA) - return cvGetWindowRect_COCOA(winname.c_str()); #else return Rect(-1, -1, -1, -1); #endif @@ -611,8 +601,6 @@ return setWindowTitle_GTK(winname, title); #elif defined (HAVE_QT) return setWindowTitle_QT(winname, title); -#elif defined (HAVE_COCOA) - return setWindowTitle_COCOA(winname, title); #else CV_Error(Error::StsNotImplemented, "The function is not implemented. " "Rebuild the library with Windows, GTK+ 2.x or Cocoa support. " @@ -1225,7 +1213,6 @@ #if defined (HAVE_WIN32UI) // see window_w32.cpp #elif defined (HAVE_GTK) // see window_gtk.cpp -#elif defined (HAVE_COCOA) // see window_cocoa.mm #elif defined (HAVE_QT) // see window_QT.cpp #elif defined (WINRT) && !defined (WINRT_8_0) // see window_winrt.cpp