FIRE-13129: Ctrl + Shift + W will not close communications floater if an IM tab is open

Ansariel 2014-03-14 09:59:11 +01:00
parent 41efe6a71b
commit 55aa33ae20
3 changed files with 12 additions and 33 deletions

View File

@ -1874,6 +1874,14 @@ void LLFloater::initRectControl()
void LLFloater::closeFrontmostFloater()
{
LLFloater* floater_to_close = gFloaterView->getFrontmostClosableFloater();
// <FS:Ansariel> CTRL-W doesn't work with multifloaters
LLMultiFloater* multi_floater = dynamic_cast<LLMultiFloater*>(floater_to_close);
if (multi_floater)
{
multi_floater->closeDockedFloater();
}
else
// </FS:Ansariel>
if(floater_to_close)
{
floater_to_close->closeFloater();

View File

@ -579,14 +579,8 @@ void LLMultiFloater::computeResizeLimits(S32& new_min_width, S32& new_min_height
}
// <FS:Ansariel> CTRL-W doesn't work with multifloaters
void LLMultiFloater::closeFloater(bool app_quitting)
void LLMultiFloater::closeDockedFloater()
{
if (app_quitting)
{
LLFloater::closeFloater(app_quitting);
return;
}
LLFloater* floater = getActiveFloater();
// is user closeable and is system closeable
if (floater && floater->canClose() && floater->isCloseable())
@ -602,33 +596,13 @@ void LLMultiFloater::closeFloater(bool app_quitting)
else
{
// Call closeFloater() here so that focus gets properly handed over
LLFloater::closeFloater();
closeFloater();
}
return;
}
// Close multifloater itself if we can't close any hosted floaters
LLFloater::closeFloater();
}
void LLMultiFloater::onClickCloseBtn(bool app_quitting)
{
LLFloater::closeFloater(false);
}
// Ansa: Will be called when toggling view - in that case we want to
// toggle the whole floater instead of the active hosted floater
void LLMultiFloater::closeHostedFloater()
{
// When toggling *visibility*, close the host instead of the floater when hosted
if (getHost())
{
getHost()->closeFloater();
}
else
{
LLFloater::closeFloater(false);
}
closeFloater();
}
// <FS:Ansariel>

View File

@ -80,10 +80,7 @@ public:
virtual void updateFloaterTitle(LLFloater* floaterp);
// <FS:Ansariel> CTRL-W doesn't work with multifloaters
/*virtual*/ void closeFloater(bool app_quitting = false);
/*virtual*/ void onClickCloseBtn(bool app_quitting = false);
/*virtual*/ void closeHostedFloater();
// </FS:Ansariel>
void closeDockedFloater();
protected:
struct LLFloaterData