diff options
-rw-r--r-- | indra/newview/llmediactrl.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llmediactrl.h | 3 |
2 files changed, 5 insertions, 11 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 ); diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 65dfbbff78..96bb0c1df5 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -53,7 +53,8 @@ public: ignore_ui_scale, hide_loading, decouple_texture_size, - trusted_content; + trusted_content, + focus_on_click; Optional<S32> texture_width, texture_height; |