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:
parent
e64622331f
commit
5501f9a946
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user