diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 0ed700b9da82ec7db79fa0b889b51f3020af7b5f..0272c55db21a812978de298b25463be1dd13429b 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -775,33 +775,6 @@ void LLMemoryInfo::stream(std::ostream& s) const
 #endif
 }
 
-S32 LLDisplayInfo::getDisplayWidth() const
-{
-#if LL_WINDOWS
-	return  ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
-#elif LL_DARWIN
-	return 1024; //*FIXME
-#elif LL_SOLARIS
-	return 1024; //*FIXME
-#else
-	return 1024; //*FIXME
-#endif
-}
-
-S32 LLDisplayInfo::getDisplayHeight() const
-{
-#if LL_WINDOWS
-	return  ::GetSystemMetrics(SM_CYVIRTUALSCREEN);
-#elif LL_DARWIN
-	return 768; //*FIXME
-#elif LL_SOLARIS
-	return 768; //*FIXME
-#else
-	return 768; //*FIXME
-#endif
-}
-
-
 std::ostream& operator<<(std::ostream& s, const LLOSInfo& info)
 {
 	info.stream(s);
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index aa3fdd485bca84d7c6088daaf80890be06a5edf6..f1dda1b2e22ebca0c45440fc55ce40f5eb2a41ab 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -122,22 +122,6 @@ class LL_COMMON_API LLMemoryInfo
 	U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes
 };
 
-//=============================================================================
-//
-//	CLASS		LLDisplayInfo
-class LL_COMMON_API LLDisplayInfo
-
-/*!	@brief		Class to query the information about some display settings
-*/
-{
-public:
-	LLDisplayInfo(){}; ///< Default constructor
-
-	S32 getDisplayWidth() const; ///< display width
-	S32 getDisplayHeight() const; ///< display height
-	
-};
-
 LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLOSInfo& info);
 LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info);
 LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info);
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 1c6c9e6e9d210ba202c7ab1794cbf207aedd38ce..b77deb003f4f5fd21ecfc52e222787c99cc2b2bf 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -407,3 +407,30 @@ BOOL LLWindowManager::isWindowValid(LLWindow *window)
 {
 	return sWindowList.find(window) != sWindowList.end();
 }
+
+S32 LLDisplayInfo::getDisplayWidth() const
+{
+#if LL_WINDOWS
+	return LLWindowWin32::getDisplayWidth();
+#elif LL_DARWIN
+	return LLWindowMacOSX::getDisplayWidth();
+#elif LL_SDL
+	return LLWindowSDL::getDisplayWidth();
+#else
+	return 1024; //*FIXME
+#endif
+}
+
+S32 LLDisplayInfo::getDisplayHeight() const
+{
+#if LL_WINDOWS
+	return LLWindowWin32::getDisplayHeight();
+#elif LL_DARWIN
+	return LLWindowMacOSX::getDisplayHeight();
+#elif LL_SDL
+	return LLWindowSDL::getDisplayHeight();
+#else
+	return 768; //*FIXME
+#endif
+}
+
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 55b221e7161fe6a6682ded12a40b63ab9fe341d6..b769f5071bc3c71634625a67c8e52e4c08c85023 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -281,4 +281,19 @@ extern const std::string gURLProtocolWhitelistHandler[];
 
 void simpleEscapeString ( std::string& stringIn  );
 
+//=============================================================================
+//
+//	CLASS		LLDisplayInfo
+class LLDisplayInfo
+
+/*!	@brief		Class to query the information about some display settings
+*/
+{
+public:
+	LLDisplayInfo(){}; ///< Default constructor
+
+	S32 getDisplayWidth() const; ///< display width
+	S32 getDisplayHeight() const; ///< display height
+};
+
 #endif // _LL_window_h_
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h
index ed5d7b1e74545230c1208d52186ffc30fb9bc201..66851300d4a679352f654223527004884f91ac60 100644
--- a/indra/llwindow/llwindowmacosx-objc.h
+++ b/indra/llwindow/llwindowmacosx-objc.h
@@ -40,4 +40,5 @@ void setupCocoa();
 CursorRef createImageCursor(const char *fullpath, int hotspotX, int hotspotY);
 OSErr releaseImageCursor(CursorRef ref);
 OSErr setImageCursor(CursorRef ref);
+void getScreenSize(int* width, int* height);
 
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 59b25e17268ca57fc4c4d90b0bf46ac7bb601a49..6eca24ec1d442e8018b2d5e5a3346d588fcec6ba 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -116,3 +116,12 @@ OSErr setImageCursor(CursorRef ref)
 	return noErr;
 }
 
+void getScreenSize(int* width, int* height)
+{
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+	NSRect screen_rect = [[NSScreen mainScreen] frame];
+	if (width)  *width  = (int)(screen_rect.size.width);
+	if (height) *height = (int)(screen_rect.size.height);
+	[pool release];
+}
+
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index ad97bc45fc782370e0eb7e113ef498391926cdaa..5b21e06fe2a6968e63601d543752003393d426ad 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -3464,6 +3464,26 @@ MASK LLWindowMacOSX::modifiersToMask(SInt16 modifiers)
 	return mask;
 }	
 
+// static
+S32 LLWindowMacOSX::getDisplayWidth()
+{
+	S32 width = 1024;
+	// Need to invoke cocoa before use getScreenSize()
+	setupCocoa();
+	getScreenSize(&width, NULL);
+	return width;
+}
+
+// static
+S32 LLWindowMacOSX::getDisplayHeight()
+{
+	S32 height = 768;
+	// Need to invoke cocoa before use getScreenSize()
+	setupCocoa();
+	getScreenSize(NULL, &height);
+	return height;
+}
+
 #if LL_OS_DRAGDROP_ENABLED
 
 OSErr LLWindowMacOSX::dragTrackingHandler(DragTrackingMessage message, WindowRef theWindow,
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 7c6b32402960b161d7ca22bc8857b052b0f931c5..86036a261c54c4d8b53db8e5ba95a80567a21eb7 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -123,6 +123,8 @@ class LLWindowMacOSX : public LLWindow
 	// Provide native key event data
 	/*virtual*/ LLSD getNativeKeyData();
 
+	static S32 getDisplayWidth();
+	static S32 getDisplayHeight();
 
 protected:
 	LLWindowMacOSX(LLWindowCallbacks* callbacks,
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 1f705f9e60b156cfde44c4d1f750bad39c22f18b..fe0ada5b09445f4192541cd6170b2f3fb19ebe8c 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -187,6 +187,47 @@ Display* LLWindowSDL::get_SDL_Display(void)
 }
 #endif // LL_X11
 
+// static
+S32 LLWindowSDL::getDisplayWidth()
+{
+#if LL_GTK
+	if (LLWindowSDL::ll_try_gtk_init())
+	{
+		return gdk_screen_width();
+	}
+#endif // LL_GTK
+
+#if LL_X11
+	Display *display = XOpenDisplay(NULL);
+	int screen_num = DefaultScreen(display);
+	S32 width = DisplayWidth(display, screen_num);
+	XCloseDisplay(display);
+	return width;
+#endif //LL_X11
+
+	return 1024;
+}
+
+// static
+S32 LLWindowSDL::getDisplayHeight()
+{
+#if LL_GTK
+	if (LLWindowSDL::ll_try_gtk_init())
+	{
+		return gdk_screen_height();
+	}
+#endif // LL_GTK
+
+#if LL_X11
+	Display *display = XOpenDisplay(NULL);
+	int screen_num = DefaultScreen(display);
+	S32 height = DisplayHeight(display, screen_num);
+	XCloseDisplay(display);
+	return height;
+#endif //LL_X11
+
+	return 768;
+}
 
 LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
 			 const std::string& title, S32 x, S32 y, S32 width,
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index e6bdd46a77f204fd232da297663fde2985ee1b71..2311a361fab380fc8b631a46be96fdffaae18c5c 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -148,6 +148,9 @@ class LLWindowSDL : public LLWindow
 	static Display* get_SDL_Display(void);
 #endif // LL_X11	
 
+	static S32 getDisplayWidth();
+	static S32 getDisplayHeight();
+
 protected:
 	LLWindowSDL(LLWindowCallbacks* callbacks,
 		const std::string& title, int x, int y, int width, int height, U32 flags,
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index c80392ad4562808ab67af244135acc83b3868239..4be5d06c2b59bc67654a6516a409676d40d284d3 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3714,5 +3714,16 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList()
 	return std::vector<std::string>();
 }
 
+// static
+S32 LLWindowWin32::getDisplayWidth()
+{
+	return ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
+}
+
+// static
+S32 LLWindowWin32::getDisplayHeight()
+{
+	return ::GetSystemMetrics(SM_CYVIRTUALSCREEN);
+}
 
 #endif // LL_WINDOWS
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 9d5773577202a06547903ac686cb112ebf1b2ed3..c221ec0192be8750e79b4cb5dce225a1439c62f6 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -120,6 +120,9 @@ class LLWindowWin32 : public LLWindow
 
 	static std::vector<std::string> getDynamicFallbackFontList();
 
+	static S32 getDisplayWidth();
+	static S32 getDisplayHeight();
+
 protected:
 	LLWindowWin32(LLWindowCallbacks* callbacks,
 		const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, 
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6d4c90c2b95a9b368dc8c10c58f73fccacecdf90..8b3f3aa28e376788800c86c6c629a0c9796fbd1b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -305,7 +305,7 @@ static std::string gLaunchFileOnQuit;
 // Used on Win32 for other apps to identify our window (eg, win_setup)
 const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
 static const S32 FIRST_RUN_WINDOW_WIDTH = 1024;
-static const S32 FIRST_RUN_WINDOW_HRIGHT = 768;
+static const S32 FIRST_RUN_WINDOW_HIGHT = 768;
 //----------------------------------------------------------------------------
 
 // List of entries from strings.xml to always replace
@@ -2375,12 +2375,12 @@ bool LLAppViewer::initWindow()
 	if (first_run)//for first login 
 	{
 		window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded
-		window_height = FIRST_RUN_WINDOW_HRIGHT;
+		window_height = FIRST_RUN_WINDOW_HIGHT;
 		
 		//if screen resolution is lower then 1024*768 then show maximized
 		LLDisplayInfo display_info;
 		if(display_info.getDisplayWidth() <= FIRST_RUN_WINDOW_WIDTH
-			|| display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HRIGHT)
+			|| display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HIGHT)
 		{
 			show_maximized = true;
 		}