diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-04-03 11:06:33 -0700 |
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-04-03 11:06:33 -0700 |
| commit | 36a0a58487063152d8aacdeb22060025fe0021c7 (patch) | |
| tree | 58a59dee2b88e1e51391987b157a37b3c8cd710b /indra/llwindow/llwindowmacosx.cpp | |
| parent | 8b5b0ace9bfb83540fbc73376b639180d6d63a3b (diff) | |
| parent | fa6add3fcd300b21142e3381f35851b3404ee02a (diff) | |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-development.
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); |
