1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

highgui(cocoa): fix moveWindow Y conversion when Dock is visible

This commit is contained in:
Andrew Owens
2026-02-25 12:31:47 -10:00
parent 1d6b8bdef7
commit 5abe4678c1
+4 -2
View File
@@ -244,7 +244,8 @@ CV_IMPL void cvShowImage( const char* name, const CvArr* arr)
int y = [window y0];
if(x >= 0 && y >= 0)
{
y = [[window screen] visibleFrame].size.height - y;
NSRect visibleFrame = [[window screen] visibleFrame];
y = NSMaxY(visibleFrame) - y;
[window setFrameTopLeftPoint:NSMakePoint(x, y)];
}
}
@@ -285,7 +286,8 @@ CV_IMPL void cvMoveWindow( const char* name, int x, int y)
[window setY0:y];
}
else {
y = [[window screen] visibleFrame].size.height - y;
NSRect visibleFrame = [[window screen] visibleFrame];
y = NSMaxY(visibleFrame) - y;
[window setFrameTopLeftPoint:NSMakePoint(x, y)];
}
}