Mac OS X: fix GL alignment in 'metal frames
svn: r5513
This commit is contained in:
parent
25740b3224
commit
b7f5fd2d3d
|
@ -884,9 +884,13 @@ void wxCanvas::OnPaint(void)
|
||||||
void wxCanvas::ResetGLView()
|
void wxCanvas::ResetGLView()
|
||||||
{
|
{
|
||||||
if (wx_dc->gl) {
|
if (wx_dc->gl) {
|
||||||
wxArea* clientArea, *topClientArea;
|
wxArea* clientArea;
|
||||||
|
wxMacDC *macdc;
|
||||||
wxFrame *fr;
|
wxFrame *fr;
|
||||||
int h, w, th;
|
CGrafPtr graf;
|
||||||
|
WindowRef win;
|
||||||
|
int h, w;
|
||||||
|
Rect cr, sr;
|
||||||
|
|
||||||
SetCurrentMacDC();
|
SetCurrentMacDC();
|
||||||
|
|
||||||
|
@ -895,11 +899,15 @@ void wxCanvas::ResetGLView()
|
||||||
h = clientArea->Height();
|
h = clientArea->Height();
|
||||||
|
|
||||||
fr = GetRootFrame();
|
fr = GetRootFrame();
|
||||||
topClientArea = fr->ContentArea();
|
macdc = fr->MacDC();
|
||||||
th = topClientArea->Height();
|
graf = macdc->macGrafPort();
|
||||||
|
win = GetWindowFromPort(graf);
|
||||||
|
|
||||||
wx_dc->gl->ResetGLView(SetOriginX,
|
GetWindowBounds(win, kWindowContentRgn, &cr);
|
||||||
(th - (SetOriginY + h)),
|
GetWindowBounds(win, kWindowStructureRgn, &sr);
|
||||||
|
|
||||||
|
wx_dc->gl->ResetGLView(SetOriginX + (cr.left - sr.left),
|
||||||
|
(cr.bottom - cr.top) - (SetOriginY + h) + (sr.bottom - cr.bottom),
|
||||||
w,
|
w,
|
||||||
h);
|
h);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user