From 5c78d1f1a999d5a2694e2794aa6712f6d9740ade Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Tue, 20 Apr 2010 16:18:18 +0300 Subject: fix for EXT-6625 Nearby Chat does not gain focus when clicked at the top https://codereview.productengine.com/secondlife/r/267/ mantipov --HG-- branch : product-engine --- indra/newview/llnearbychat.cpp | 11 +++++++++++ indra/newview/llnearbychat.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 5d72827a7a..e5710cd632 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -351,3 +351,14 @@ void LLNearbyChat::onFocusLost() LLPanel::onFocusLost(); } +BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask) +{ + //fix for EXT-6625 + //highlight NearbyChat history whenever mouseclick happen in NearbyChat + //setting focus to eidtor will force onFocusLost() call that in its turn will change + //background opaque. This all happenn since NearByChat is "chrome" and didn't process focus change. + + if(mChatHistory) + mChatHistory->setFocus(TRUE); + return LLDockableFloater::handleMouseDown(x, y, mask); +} diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 6ef2a1fee3..3c116dbe83 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -53,6 +53,8 @@ public: void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + // focus overrides /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); -- cgit v1.2.3