1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0027510: Visualization, OpenGl_Window - do not ignore backing store resize on OS X

This commit is contained in:
kgv 2016-05-17 21:22:54 +03:00 committed by bugmaster
parent e64622331f
commit 5501f9a946

View File

@ -255,7 +255,25 @@ void OpenGl_Window::Resize()
if (myWidthPt == aWidthPt
&& myHeightPt == aHeightPt)
{
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
return;
#else
// check backing store change (moving to another screen)
NSOpenGLContext* aGLCtx = myGlContext->myGContext;
NSView* aView = [aGLCtx view];
if (![aView respondsToSelector: @selector(convertSizeToBacking:)])
{
return;
}
NSRect aBounds = [aView bounds];
NSSize aRes = [aView convertSizeToBacking: aBounds.size];
if (myWidth == Standard_Integer(aRes.width)
&& myHeight == Standard_Integer(aRes.height))
{
return;
}
#endif
}
myWidthPt = aWidthPt;