diff options
author | Richard Linden <none@none> | 2010-11-02 16:57:55 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-11-02 16:57:55 -0700 |
commit | 5085fbfbdda90c396f1eb52b2a27212531ac87bc (patch) | |
tree | 3dddca6a6e10f0cc7399890eec42a618b7d6e9b0 /indra/newview | |
parent | f1830e905c553bff42a9035bc4bee9c40d707617 (diff) |
made focus_on_click a param for LLMediaCtrl
Diffstat (limited to 'indra/newview')
-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; |