From 833427783803641cfdce2b0dca34d43e298f866d Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Thu, 22 Mar 2012 06:02:39 +0100 Subject: [PATCH] Want ridiculously small viewer window? Here you go. --- indra/llwindow/llwindow.h | 3 +++ indra/llwindow/llwindowmacosx.cpp | 11 ++++------- indra/llwindow/llwindowsdl.cpp | 2 -- indra/llwindow/llwindowwin32.cpp | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index a15332e2f..21afee3fb 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -47,6 +47,9 @@ class LLPreeditor; class LLWindowCallbacks; +static const S32 MIN_WINDOW_WIDTH = 864; +static const S32 MIN_WINDOW_HEIGHT = 472; + // Refer to llwindow_test in test/common/llwindow for usage example class LLWindow diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 34f52701a..ecc5efd4e 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -2548,9 +2548,6 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e { // This is where we would constrain move/resize to a particular screen - const S32 MIN_WIDTH = 1024; - const S32 MIN_HEIGHT = 768; - Rect currentBounds; Rect previousBounds; @@ -2575,14 +2572,14 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e mPreviousWindowRect = previousBounds; } - if ((currentBounds.right - currentBounds.left) < MIN_WIDTH) + if ((currentBounds.right - currentBounds.left) < MIN_WINDOW_WIDTH) { - currentBounds.right = currentBounds.left + MIN_WIDTH; + currentBounds.right = currentBounds.left + MIN_WINDOW_WIDTH; } - if ((currentBounds.bottom - currentBounds.top) < MIN_HEIGHT) + if ((currentBounds.bottom - currentBounds.top) < MIN_WINDOW_HEIGHT) { - currentBounds.bottom = currentBounds.top + MIN_HEIGHT; + currentBounds.bottom = currentBounds.top + MIN_WINDOW_HEIGHT; } SetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, sizeof(Rect), ¤tBounds); diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index abaf4e826..e7e6fe6b9 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -71,8 +71,6 @@ extern BOOL gDebugWindowProc; const S32 MAX_NUM_RESOLUTIONS = 200; -const S32 MIN_WINDOW_WIDTH = 1024; -const S32 MIN_WINDOW_HEIGHT = 768; // static variable for ATI mouse cursor crash work-around: static bool ATIbug = false; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index d73fb3a0a..b047c123d 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2414,8 +2414,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_GETMINMAXINFO: { LPMINMAXINFO min_max = (LPMINMAXINFO)l_param; - min_max->ptMinTrackSize.x = 1024; - min_max->ptMinTrackSize.y = 768; + min_max->ptMinTrackSize.x = MIN_WINDOW_WIDTH; + min_max->ptMinTrackSize.y = MIN_WINDOW_HEIGHT; return 0; }