summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp1
-rw-r--r--indra/llui/llmenugl.cpp5
-rw-r--r--indra/llui/lltextbase.cpp11
-rw-r--r--indra/llui/llui.cpp5
4 files changed, 15 insertions, 7 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 4cb336f7ea..ab14c08948 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1354,7 +1354,6 @@ void LLFloater::bringToFront( S32 x, S32 y )
// virtual
void LLFloater::setVisibleAndFrontmost(BOOL take_focus)
{
- LLUI::clearPopups();
setVisible(TRUE);
setFrontmost(take_focus);
}
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 0d56c5ed31..fb4a9d032d 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3455,7 +3455,7 @@ LLView* const LLMenuHolderGL::getVisibleMenu() const
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
LLView* viewp = *child_it;
- if (viewp->getVisible() && dynamic_cast<LLMenuBarGL*>(viewp) == NULL)
+ if (viewp->getVisible() && dynamic_cast<LLMenuGL*>(viewp) != NULL)
{
return viewp;
}
@@ -3478,8 +3478,7 @@ BOOL LLMenuHolderGL::hideMenus()
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
LLView* viewp = *child_it;
- // clicks off of menu do not hide menu bar
- if (dynamic_cast<LLMenuBarGL*>(viewp) == NULL && viewp->getVisible())
+ if (dynamic_cast<LLMenuGL*>(viewp) != NULL && viewp->getVisible())
{
viewp->setVisible(FALSE);
}
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 851fb966ec..d514c0b389 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -246,7 +246,7 @@ LLTextBase::~LLTextBase()
{
// Menu, like any other LLUICtrl, is deleted by its parent - gMenuHolder
- clearSegments();
+ mSegments.clear();
}
void LLTextBase::initFromParams(const LLTextBase::Params& p)
@@ -396,8 +396,13 @@ void LLTextBase::drawSelectionBackground()
++rect_it)
{
LLRect selection_rect = *rect_it;
- selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom);
- gl_rect_2d(selection_rect, selection_color);
+ // Don't send empty rects to gl_rect_2d.
+ // Drawing degenerate rectangles seems to cause https://jira.secondlife.com/browse/EXT-6276 .
+ if(selection_rect.notEmpty())
+ {
+ selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom);
+ gl_rect_2d(selection_rect, selection_color);
+ }
}
}
}
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 5121ef5351..9134adc6d1 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -202,6 +202,11 @@ void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixe
void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
{
+ // FIXME: Drawing degenerate rectangles (specifically, zero-width rectangles) was causing
+ // https://jira.secondlife.com/browse/EXT-6276 on the Mac (presumably it was doing something bad to the GL state).
+ // That was fixed by checking for this case in LLTextBase::drawSelectionBackground().
+ // It's possible we should check for degenerate rectangles here and not draw, but I wanted to do the minimal change for the moment.
+
stop_glerror();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);