summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-04-16 23:45:35 +0000
committerAdam Moss <moss@lindenlab.com>2009-04-16 23:45:35 +0000
commitb01c75cb423f07a3d3354f8bd62f265f80062b3b (patch)
treedec1b220c24a60cc220d1cb07fd3545610644f0a /indra/llwindow/llwindowmacosx.cpp
parent868250bdd74f348557102c0d8408d9bec30331f6 (diff)
svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1 QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 4f6df0f152..65a40dcef4 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -2527,19 +2527,33 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
}
mCallbacks->handleFocusLost(this);
break;
+
case kEventWindowBoundsChanging:
{
+ // This is where we would constrain move/resize to a particular screen
+
+ const S32 MIN_WIDTH = 320;
+ const S32 MIN_HEIGHT = 240;
+
Rect currentBounds;
Rect previousBounds;
GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &currentBounds);
GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &previousBounds);
- // This is where we would constrain move/resize to a particular screen
- if(0)
+
+ if ((currentBounds.right - currentBounds.left) < MIN_WIDTH)
{
- SetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, sizeof(Rect), &currentBounds);
+ currentBounds.right = currentBounds.left + MIN_WIDTH;
}
+
+ if ((currentBounds.bottom - currentBounds.top) < MIN_HEIGHT)
+ {
+ currentBounds.bottom = currentBounds.top + MIN_HEIGHT;
+ }
+
+ SetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, sizeof(Rect), &currentBounds);
+ result = noErr;
}
break;
@@ -2597,7 +2611,6 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
// BringToFront(mWindow);
// result = noErr;
break;
-
}
break;