summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5dcf4fdb5d..9e8a7c2a9b 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3006,7 +3006,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
}
// Update rectangles for the various toolbars
- if (gOverlayBar && gNotifyBoxView && gConsole)
+ if (gOverlayBar && gNotifyBoxView && gConsole && gToolBar)
{
LLRect bar_rect(-1, STATUS_BAR_HEIGHT, getWindowWidth()+1, -1);
@@ -3028,7 +3028,8 @@ BOOL LLViewerWindow::handlePerFrameHover()
// snap floaters to top of chat bar/button strip
LLView* chatbar_and_buttons = gOverlayBar->getChild<LLView>("chatbar_and_buttons", TRUE);
- if (chatbar_and_buttons)
+ // find top of chatbar and strate buttons, if either are visible
+ if (chatbar_and_buttons && !chatbar_and_buttons->getLocalBoundingRect().isNull())
{
// convert top/left corner of chatbar/buttons container to gFloaterView-relative coordinates
S32 top, left;
@@ -3040,6 +3041,17 @@ BOOL LLViewerWindow::handlePerFrameHover()
gFloaterView);
gFloaterView->setSnapOffsetBottom(top);
}
+ else if (gToolBar->getVisible())
+ {
+ S32 top, left;
+ gToolBar->localPointToOtherView(
+ gToolBar->getLocalBoundingRect().mLeft,
+ gToolBar->getLocalBoundingRect().mTop,
+ &left,
+ &top,
+ gFloaterView);
+ gFloaterView->setSnapOffsetBottom(top);
+ }
else
{
gFloaterView->setSnapOffsetBottom(0);