summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2009-12-09 16:35:01 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2009-12-09 16:35:01 +0200
commit90ba6eb7feecb35ce7fd839c140ff3c47cff880a (patch)
tree913beb862d36f2daf4896067d4a6189851e9fe84 /indra/newview
parentcc6f28432e0b21df1cbb56bbc436175827332da1 (diff)
parent918eedc4e955062307f9422630cb3b82f7024320 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llscreenchannel.cpp18
-rw-r--r--indra/newview/llscreenchannel.h2
2 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 222b462d1a..f66f725070 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -78,6 +78,22 @@ LLScreenChannelBase::~LLScreenChannelBase()
{
mWorldViewRectConnection.disconnect();
}
+
+bool LLScreenChannelBase::isHovering()
+{
+ bool res = mHoveredToast != NULL;
+ if (!res)
+ {
+ return res;
+ }
+
+ S32 x, y;
+ mHoveredToast->screenPointToLocal(gViewerWindow->getCurrentMouseX(),
+ gViewerWindow->getCurrentMouseY(), &x, &y);
+ res = mHoveredToast->pointInView(x, y) == TRUE;
+ return res;
+}
+
void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
{
S32 top_delta = old_world_rect.mTop - new_world_rect.mTop;
@@ -644,7 +660,7 @@ void LLNotificationsUI::LLScreenChannel::startFadingToasts()
if (!mToastList.size()) return;
//because onMouseLeave is processed after onMouseEnter
- if (mHoveredToast) return;
+ if (isHovering()) return;
std::vector<ToastElem>::iterator it = mToastList.begin();
while (it != mToastList.end())
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index b551732133..b8efbb148f 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -95,7 +95,7 @@ public:
virtual void setControlHovering(bool control) { mControlHovering = control; }
- bool isHovering() { return mHoveredToast != NULL; }
+ bool isHovering();
void setCanStoreToasts(bool store) { mCanStoreToasts = store; }