summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rwxr-xr-xindra/llui/llfloater.cpp46
1 files changed, 41 insertions, 5 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 6e6bcd6ab5..cc25bfcfeb 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -505,12 +505,15 @@ void LLFloater::destroy()
// virtual
LLFloater::~LLFloater()
{
+ LL_INFOS("Baker") << "[3555] ~LLFloater() -- " << getTitle() << ":" << (void*) this << " ----------------------" << LL_ENDL;
+
LLFloaterReg::removeInstance(mInstanceName, mKey);
if( gFocusMgr.childHasKeyboardFocus(this))
{
- // Just in case we might still have focus here, release it.
- releaseFocus();
+ LL_INFOS("Baker") << "[3555] ~LLFloater() - Release keybaord focus." << LL_ENDL;
+ // Just in case we might still have focus here, release it.
+ releaseFocus();
}
// This is important so that floaters with persistent rects (i.e., those
@@ -526,10 +529,15 @@ LLFloater::~LLFloater()
}
setVisible(false); // We're not visible if we're destroyed
+
+ LL_INFOS("Baker") << "[3555] ~LLFloater() - Storing visibility control" << LL_ENDL;
storeVisibilityControl();
+
+ LL_INFOS("Baker") << "[3555] ~LLFloater() - Storing dock state control" << LL_ENDL;
storeDockStateControl();
-
delete mMinimizeSignal;
+
+ LL_INFOS("Baker") << "[3555] Exiting ~LLFloater() " << (void*) this << LL_ENDL;
}
void LLFloater::storeRectControl()
@@ -1951,6 +1959,7 @@ void LLFloater::drawShadow(LLPanel* panel)
void LLFloater::updateTransparency(LLView* view, ETypeTransparency transparency_type)
{
+ if (!view) return;
child_list_t children = *view->getChildList();
child_list_t::iterator it = children.begin();
@@ -2742,8 +2751,6 @@ void LLFloaterView::refresh()
}
}
-const S32 FLOATER_MIN_VISIBLE_PIXELS = 16;
-
void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside, BOOL snap_in_toolbars/* = false*/)
{
if (floater->getParent() != this)
@@ -2796,11 +2803,32 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
}
}
+ const LLRect& left_toolbar_rect = mToolbarRects[LLToolBarEnums::TOOLBAR_LEFT];
+ const LLRect& bottom_toolbar_rect = mToolbarRects[LLToolBarEnums::TOOLBAR_BOTTOM];
+ const LLRect& right_toolbar_rect = mToolbarRects[LLToolBarEnums::TOOLBAR_RIGHT];
+ const LLRect& floater_rect = floater->getRect();
+
+ S32 delta_left = left_toolbar_rect.notEmpty() ? left_toolbar_rect.mRight - floater_rect.mRight : 0;
+ S32 delta_bottom = bottom_toolbar_rect.notEmpty() ? bottom_toolbar_rect.mTop - floater_rect.mTop : 0;
+ S32 delta_right = right_toolbar_rect.notEmpty() ? right_toolbar_rect.mLeft - floater_rect.mLeft : 0;
+
// move window fully onscreen
if (floater->translateIntoRect( snap_in_toolbars ? getSnapRect() : gFloaterView->getRect(), allow_partial_outside ? FLOATER_MIN_VISIBLE_PIXELS : S32_MAX ))
{
floater->clearSnapTarget();
}
+ else if (delta_left > 0 && floater_rect.mTop < left_toolbar_rect.mTop && floater_rect.mBottom > left_toolbar_rect.mBottom)
+ {
+ floater->translate(delta_left, 0);
+ }
+ else if (delta_bottom > 0 && floater_rect.mLeft > bottom_toolbar_rect.mLeft && floater_rect.mRight < bottom_toolbar_rect.mRight)
+ {
+ floater->translate(0, delta_bottom);
+ }
+ else if (delta_right < 0 && floater_rect.mTop < right_toolbar_rect.mTop && floater_rect.mBottom > right_toolbar_rect.mBottom)
+ {
+ floater->translate(delta_right, 0);
+ }
}
void LLFloaterView::draw()
@@ -3000,6 +3028,14 @@ void LLFloaterView::popVisibleAll(const skip_list_t& skip_list)
LLFloaterReg::blockShowFloaters(false);
}
+void LLFloaterView::setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LLRect& toolbar_rect)
+{
+ if (tb < LLToolBarEnums::TOOLBAR_COUNT)
+ {
+ mToolbarRects[tb] = toolbar_rect;
+ }
+}
+
void LLFloater::setInstanceName(const std::string& name)
{
if (name != mInstanceName)