mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -219,7 +219,7 @@ void cv::setWindowProperty(const String& name, int prop_id, double prop_value)
|
||||
//change between fullscreen or not.
|
||||
case cv::WND_PROP_FULLSCREEN:
|
||||
|
||||
if (prop_value != cv::WINDOW_NORMAL && prop_value != cv::WINDOW_FULLSCREEN) // bad argument
|
||||
if ((int)prop_value != cv::WINDOW_NORMAL && (int)prop_value != cv::WINDOW_FULLSCREEN) // bad argument
|
||||
break;
|
||||
|
||||
#if defined (HAVE_QT)
|
||||
|
||||
@@ -595,14 +595,16 @@ cv::Rect cvGetWindowRect_COCOA( const char* name )
|
||||
{
|
||||
CV_Error( cv::Error::StsNullPtr, "NULL window" );
|
||||
} else {
|
||||
NSRect rect = [window frame];
|
||||
@autoreleasepool {
|
||||
NSRect rect = [window frame];
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6
|
||||
NSPoint pt = [window convertRectToScreen:rect].origin;
|
||||
NSPoint pt = [window convertRectToScreen:rect].origin;
|
||||
#else
|
||||
NSPoint pt = [window convertBaseToScreen:rect.origin];
|
||||
NSPoint pt = [window convertBaseToScreen:rect.origin];
|
||||
#endif
|
||||
NSSize sz = [[[window contentView] image] size];
|
||||
result = cv::Rect(pt.x, pt.y, sz.width, sz.height);
|
||||
NSSize sz = [[[window contentView] image] size];
|
||||
result = cv::Rect(pt.x, pt.y, sz.width, sz.height);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2108,7 +2108,7 @@ public:
|
||||
switch (prop)
|
||||
{
|
||||
case cv::WND_PROP_FULLSCREEN:
|
||||
if (value != cv::WINDOW_NORMAL && value != cv::WINDOW_FULLSCREEN) // bad arg
|
||||
if ((int)value != cv::WINDOW_NORMAL && (int)value != cv::WINDOW_FULLSCREEN) // bad arg
|
||||
break;
|
||||
setModeWindow_(window, value);
|
||||
return true;
|
||||
|
||||
@@ -2111,6 +2111,9 @@ static void showSaveDialog(CvWindow& window)
|
||||
#ifdef HAVE_JPEG
|
||||
"JPEG files (*.jpeg;*.jpg;*.jpe)\0*.jpeg;*.jpg;*.jpe\0"
|
||||
#endif
|
||||
#ifdef HAVE_JPEGXL
|
||||
"JPEG XL files (*.jxl)\0*.jxl\0"
|
||||
#endif
|
||||
#ifdef HAVE_TIFF
|
||||
"TIFF Files (*.tiff;*.tif)\0*.tiff;*.tif\0"
|
||||
#endif
|
||||
@@ -2686,7 +2689,7 @@ public:
|
||||
switch ((WindowPropertyFlags)prop)
|
||||
{
|
||||
case WND_PROP_FULLSCREEN:
|
||||
if (value != WINDOW_NORMAL && value != WINDOW_FULLSCREEN) // bad arg
|
||||
if ((int)value != WINDOW_NORMAL && (int)value != WINDOW_FULLSCREEN) // bad arg
|
||||
break;
|
||||
setModeWindow_(window, (int)value);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user