diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-09 16:35:13 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-09 16:35:13 +0200 |
commit | d5f7f1b723a14b15862c38469424133087353bf3 (patch) | |
tree | afde76ca6d8e7efaef17eb97dcf4aff93a5f91f5 /indra/newview | |
parent | e94e6714b9f12886ae7ad72df21b17ddea468214 (diff) | |
parent | 90ba6eb7feecb35ce7fd839c140ff3c47cff880a (diff) |
Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llscreenchannel.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llscreenchannel.h | 2 |
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; } |