From c22da3a2a9c4e2fa1e0b0b0c544f5933e91c6369 Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Fri, 25 Jun 2010 12:04:37 +0300
Subject: [PATCH] EXT-8040 FIXED Prevented stealing focus by script error
 window. reviewed by Mike Antipov at
 https://codereview.productengine.com/secondlife/r/656/

--HG--
branch : product-engine
---
 indra/newview/llfloaterscriptdebug.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index d6732a9d5cb..4a82f3a11cb 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -63,6 +63,8 @@ LLFloaterScriptDebug::LLFloaterScriptDebug(const LLSD& key)
 	// avoid resizing of the window to match 
 	// the initial size of the tabbed-childs, whenever a tab is opened or closed
 	mAutoResize = FALSE;
+	// enabled autocous blocks controling focus via  LLFloaterReg::showInstance
+	setAutoFocus(FALSE);
 }
 
 LLFloaterScriptDebug::~LLFloaterScriptDebug()
@@ -93,7 +95,8 @@ LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id)
 		return NULL;
 
 	LLFloater::setFloaterHost(host);
-	LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id);
+	// prevent stealing focus, see EXT-8040
+	LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, FALSE);
 	LLFloater::setFloaterHost(NULL);
 
 	return floaterp;
@@ -145,6 +148,9 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id)
 	mObjectID(object_id.asUUID())
 {
 	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug_panel.xml");
+	
+	// enabled autocous blocks controling focus via  LLFloaterReg::showInstance
+	setAutoFocus(FALSE);
 }
 
 BOOL LLFloaterScriptDebugOutput::postBuild()
-- 
GitLab