1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #28576 from AndrewO-MMLLC:fix/28571-cvMoveWindow-macOS-dock-offset

highgui(cocoa): fix moveWindow Y conversion when Dock is visible
This commit is contained in:
Alexander Smorkalov
2026-03-01 15:28:56 +03:00
committed by GitHub
+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)];
}
}