diff options
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r-- | indra/newview/llnearbychat.cpp | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index d1c7c6bfd7..dbdf460785 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -195,8 +195,13 @@ BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask) //background opaque. This all happenn since NearByChat is "chrome" and didn't process focus change. if(mChatHistory) + { mChatHistory->setFocus(TRUE); - return LLPanel::handleMouseDown(x, y, mask); + } + + BOOL handled = LLPanel::handleMouseDown(x, y, mask); + setFocus(handled); + return handled; } void LLNearbyChat::reloadMessages() @@ -270,17 +275,6 @@ void LLNearbyChat::removeScreenChat() } } -void LLNearbyChat::setFocus(BOOL focusFlag) -{ - LLTransientDockableFloater::setFocus(focusFlag); - - //Redirect focus to input editor - if (focusFlag) - { - mInputEditor->setFocus(TRUE); - } - -} void LLNearbyChat::setVisible(BOOL visible) { @@ -293,7 +287,7 @@ void LLNearbyChat::setVisible(BOOL visible) setFocus(visible); } - +// virtual void LLNearbyChat::onTearOffClicked() { LLIMConversation::onTearOffClicked(); @@ -311,6 +305,26 @@ void LLNearbyChat::onOpen(const LLSD& key) showTranslationCheckbox(LLTranslate::isTranslationConfigured()); } +// virtual +void LLNearbyChat::onClose(bool app_quitting) +{ + // Override LLIMConversation::onClose() so that Nearby Chat is not removed from the conversation floater +} + +// virtual +void LLNearbyChat::onClickCloseBtn() +{ + if (!isTornOff()) + return; + onTearOffClicked(); + + LLIMFloaterContainer *im_box = LLIMFloaterContainer::findInstance(); + if (im_box) + { + im_box->onNearbyChatClosed(); + } +} + void LLNearbyChat::onChatFontChange(LLFontGL* fontp) { // Update things with the new font whohoo |