diff options
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r-- | indra/newview/llmediactrl.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index e84c9152b1..0f66713ab0 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -70,7 +70,8 @@ LLMediaCtrl::Params::Params() caret_color("caret_color"), initial_mime_type("initial_mime_type"), media_id("media_id"), - trusted_content("trusted_content", false) + trusted_content("trusted_content", false), + focus_on_click("focus_on_click", true) { tab_stop(false); } @@ -86,7 +87,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mIgnoreUIScale( true ), mAlwaysRefresh( false ), mMediaSource( 0 ), - mTakeFocusOnClick( true ), + mTakeFocusOnClick( p.focus_on_click ), mCurrentNavUrl( "" ), mStretchToFill( true ), mMaintainAspectRatio ( true ), @@ -206,14 +207,6 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask ) if (mMediaSource) { mMediaSource->mouseUp(x, y, mask); - - // *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup, - // in addition to the onFocusReceived() call below. Undo this. JC - if (!mTakeFocusOnClick) - { - mMediaSource->focus(false); - gViewerWindow->focusClient(); - } } gFocusMgr.setMouseCapture( NULL ); |