summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorEugene Mutavchi <emutavchi@productengine.com>2010-02-01 18:25:58 +0200
committerEugene Mutavchi <emutavchi@productengine.com>2010-02-01 18:25:58 +0200
commit7bcba326b32e1aca678edfb4495d1e2d4d44cb71 (patch)
tree29029705ec17e7778b6b11542f46d4d8b4fcdc2c /indra
parentd5e97617c661dd3518ef1caa6903867ad044df8d (diff)
Fixed major bug EXT-4798 (Voice notifications steal keyboard focus by default)
--HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lldockablefloater.cpp2
-rw-r--r--indra/llui/llfloater.h1
-rw-r--r--indra/newview/llimview.cpp7
3 files changed, 6 insertions, 4 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 74438b184a..57baf28dab 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -146,7 +146,7 @@ void LLDockableFloater::setVisible(BOOL visible)
if (visible)
{
- LLFloater::setFrontmost(TRUE);
+ LLFloater::setFrontmost(getAutoFocus());
}
LLFloater::setVisible(visible);
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 8c9dacbd20..2166d8db8a 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -301,6 +301,7 @@ protected:
const LLRect& getExpandedRect() const { return mExpandedRect; }
void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened
+ BOOL getAutoFocus() const { return mAutoFocus; }
LLDragHandle* getDragHandle() const { return mDragHandle; }
void destroy() { die(); } // Don't call this directly. You probably want to call closeFloater()
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b7d4db853e..db6b2041f8 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1467,6 +1467,7 @@ LLCallDialog::LLCallDialog(const LLSD& payload)
mPayload(payload),
mLifetime(DEFAULT_LIFETIME)
{
+ setAutoFocus(FALSE);
}
void LLCallDialog::getAllowedRect(LLRect& rect)
@@ -1794,7 +1795,7 @@ BOOL LLIncomingCallDialog::postBuild()
childSetAction("Accept", onAccept, this);
childSetAction("Reject", onReject, this);
childSetAction("Start IM", onStartIM, this);
- childSetFocus("Accept");
+ setDefaultBtn("Accept");
std::string notify_box_type = mPayload["notify_box_type"].asString();
if(notify_box_type != "VoiceInviteGroup" && notify_box_type != "VoiceInviteAdHoc")
@@ -2424,7 +2425,7 @@ void LLIMMgr::inviteToSession(
}
else
{
- LLFloaterReg::showInstance("incoming_call", payload, TRUE);
+ LLFloaterReg::showInstance("incoming_call", payload, FALSE);
}
mPendingInvitations[session_id.asString()] = LLSD();
}
@@ -2437,7 +2438,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri
std::string notify_box_type = payload["notify_box_type"].asString();
- LLFloaterReg::showInstance("incoming_call", payload, TRUE);
+ LLFloaterReg::showInstance("incoming_call", payload, FALSE);
}
//*TODO disconnects all sessions