Window API refactor

This commit is contained in:
elasota
2020-05-20 17:20:50 -04:00
parent 49c438b088
commit f53dc21475
26 changed files with 137 additions and 127 deletions

View File

@@ -36,8 +36,9 @@ void GetWindowLeftTop (WindowPtr theWindow, short *left, short *top)
}
else
{
*left = static_cast<short>(theWindow->m_wmX);
*top = static_cast<short>(theWindow->m_wmY);
const Point windowPos = theWindow->GetTopLeftCoord();
*left = windowPos.h;
*top = windowPos.v;
}
}
@@ -51,7 +52,7 @@ void GetWindowRect (WindowPtr theWindow, Rect *bounds)
{
Point upperLeft;
GetWindowLeftTop(theWindow, &upperLeft.h, &upperLeft.v);
*bounds = theWindow->m_surface.m_port.GetRect() + upperLeft;
*bounds = theWindow->GetSurfaceRect() + upperLeft;
}
}