summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltoolpie.cpp3
-rw-r--r--indra/newview/llviewermediafocus.cpp16
2 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 22ed1ec219..7c17699bf9 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1049,6 +1049,9 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
}
else
{
+ // Make sure keyboard focus is set to the media focus object.
+ gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance());
+
media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE));
mMediaMouseCaptureID = mep->getMediaID();
setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture.
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index ad48ec145b..b47e0b8406 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -114,7 +114,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
}
else
{
- if(hasFocus())
+ if(mFocusedImplID != LLUUID::null)
{
if(mMediaHUD.get())
{
@@ -249,20 +249,18 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal,
}
void LLViewerMediaFocus::onFocusReceived()
{
- // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media.
-// LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
-// if(media_impl.notNull())
-// media_impl->focus(true);
+ LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
+ if(media_impl)
+ media_impl->focus(true);
LLFocusableElement::onFocusReceived();
}
void LLViewerMediaFocus::onFocusLost()
{
- // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media.
-// LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
-// if(media_impl.notNull())
-// media_impl->focus(false);
+ LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
+ if(media_impl)
+ media_impl->focus(false);
gViewerWindow->focusClient();
LLFocusableElement::onFocusLost();