diff options
| author | Merov Linden <merov@lindenlab.com> | 2012-06-08 17:29:56 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2012-06-08 17:29:56 -0700 |
| commit | ac6f0304c51b6b8c8e4414ff1bc254be78f0845d (patch) | |
| tree | 0b211c8c84ff92e6cdbeeb8d0197314e4821a60c /indra/llwindow/llwindowmacosx.cpp | |
| parent | 1aba6c119ef05a4cfd91325c8455dc8c60098746 (diff) | |
| parent | cdb57cb299097b203581a6ef99840350831c321c (diff) | |
Merge pull from richard/viewer-chui
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
| -rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index c952f8bbcf..32bb84cba5 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1266,6 +1266,31 @@ BOOL LLWindowMacOSX::setSizeImpl(const LLCoordScreen size) return TRUE; } +BOOL LLWindowMacOSX::setSizeImpl(const LLCoordWindow size) +{ + Rect client_rect; + if (mWindow) + { + OSStatus err = GetWindowBounds(mWindow, kWindowContentRgn, &client_rect); + if (err == noErr) + { + client_rect.right = client_rect.left + size.mX; + client_rect.bottom = client_rect.top + size.mY; + err = SetWindowBounds(mWindow, kWindowContentRgn, &client_rect); + } + if (err == noErr) + { + return TRUE; + } + else + { + llinfos << "Error setting size" << err << llendl; + return FALSE; + } + } + return FALSE; +} + void LLWindowMacOSX::swapBuffers() { aglSwapBuffers(mContext); |
