From 9229f09928a6604e7e1646be582e8322fdcca4e9 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Thu, 18 Mar 2010 16:28:54 +0200
Subject: [PATCH] Backed out changeset a95c1f4dcf02  EXT-4820([NUX] Viewer
 dimensions on first-run)

by which "implemented LLWindowMacOSX::maximize() method"

--HG--
branch : product-engine
---
 indra/llwindow/llwindowmacosx-objc.h  |  2 +-
 indra/llwindow/llwindowmacosx-objc.mm | 10 ----------
 indra/llwindow/llwindowmacosx.cpp     | 28 +--------------------------
 3 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h
index ed8c874dcbf..66851300d4a 100644
--- a/indra/llwindow/llwindowmacosx-objc.h
+++ b/indra/llwindow/llwindowmacosx-objc.h
@@ -41,4 +41,4 @@ CursorRef createImageCursor(const char *fullpath, int hotspotX, int hotspotY);
 OSErr releaseImageCursor(CursorRef ref);
 OSErr setImageCursor(CursorRef ref);
 void getScreenSize(int* width, int* height);
-void getVisibleScreen(int *x, int *y, int* width, int* height);
+
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 5cab2619fdb..6eca24ec1d4 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -125,13 +125,3 @@ void getScreenSize(int* width, int* height)
 	[pool release];
 }
 
-void getVisibleScreen(int *x, int *y, int* width, int* height)
-{
-	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-	NSRect visible_rect = [[NSScreen mainScreen] visibleFrame];
-	if (width)  *width = (int)(visible_rect.size.width);
-	if (height) *height = (int)(visible_rect.size.height);
-	if (x) *x = (int)(visible_rect.origin.x);
-	if (y) *y = (int)(visible_rect.origin.y);
-	[pool release];
-}
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 924acaf1482..5b21e06fe2a 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1122,33 +1122,7 @@ BOOL LLWindowMacOSX::getMaximized()
 
 BOOL LLWindowMacOSX::maximize()
 {
-	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;
-	}
+	// TODO
 	return FALSE;
 }
 
-- 
GitLab