summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
authorEugene Mutavchi <emutavchi@productengine.com>2010-03-05 21:36:41 +0200
committerEugene Mutavchi <emutavchi@productengine.com>2010-03-05 21:36:41 +0200
commit870dcca7871a1903d688c3f6a8f2b30d7cf62b7e (patch)
tree9d419c5624b73c9adfc893d5fff5cf49db858458 /indra/llwindow/llwindowmacosx.cpp
parent92025836edd66992fecd6b25c3fd3880bba9be67 (diff)
Working on major bug EXT-4820([NUX] Viewer dimensions on first-run) - implemented LLWindowMacOSX::maximize() method
--HG-- branch : product-engine
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 5b21e06fe2..924acaf148 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1122,7 +1122,33 @@ BOOL LLWindowMacOSX::getMaximized()
BOOL LLWindowMacOSX::maximize()
{
- // TODO
+ if (mWindow)
+ {
+ // *HACK: Because Mac OSX doesn't have a concept of a "maximized" window, we just
+ // stretch it out to the visible screen size.
+ Rect win_rect;
+
+ int visible_x;
+ int visible_y;
+ int visible_width;
+ int visible_height;
+ int screen_width;
+ int screen_height;
+
+ getScreenSize(&screen_width, &screen_height);
+ getVisibleScreen(&visible_x, &visible_y, &visible_width, &visible_height);
+
+ int mac_os_menu_bar_height = screen_height - (visible_height + visible_y);
+ ::SetRect(&win_rect,
+ visible_x,
+ mac_os_menu_bar_height,
+ visible_width + visible_x,
+ visible_height + mac_os_menu_bar_height);
+
+ ::SetWindowBounds(mWindow, kWindowStructureRgn, &win_rect);
+
+ return TRUE;
+ }
return FALSE;
}