summaryrefslogtreecommitdiff
path: root/indra/llui/llmodaldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-rw-r--r--indra/llui/llmodaldialog.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index eac43900f6..f09b87493c 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -28,6 +28,7 @@
#include "llmodaldialog.h"
+#include "llemojihelper.h"
#include "llfocusmgr.h"
#include "v4color.h"
#include "v2math.h"
@@ -35,19 +36,20 @@
#include "llwindow.h"
#include "llkeyboard.h"
#include "llmenugl.h"
+
// static
std::list<LLModalDialog*> LLModalDialog::sModalStack;
-LLModalDialog::LLModalDialog( const LLSD& key, BOOL modal )
+LLModalDialog::LLModalDialog(const LLSD& key, BOOL modal)
: LLFloater(key),
- mModal( modal )
+ mModal(modal)
{
if (modal)
{
setCanMinimize(FALSE);
setCanClose(FALSE);
}
- setVisible( FALSE );
+ setVisible(FALSE);
setBackgroundVisible(TRUE);
setBackgroundOpaque(TRUE);
centerOnScreen(); // default position
@@ -98,7 +100,7 @@ void LLModalDialog::onOpen(const LLSD& key)
{
if (mModal)
{
- // If Modal, Hide the active modal dialog
+ // If Modal, hide the active modal dialog
if (!sModalStack.empty())
{
LLModalDialog* front = sModalStack.front();
@@ -148,13 +150,18 @@ void LLModalDialog::stopModal()
}
}
-
void LLModalDialog::setVisible( BOOL visible )
{
if (mModal)
{
- if( visible )
+ if (visible)
{
+ // Hide all menus currently shown
+ LLMenuGL::sMenuContainer->hideMenus();
+
+ // Hide EmojiPicker if it is shown
+ LLEmojiHelper::instance().hideHelper(nullptr, true);
+
// This is a modal dialog. It sucks up all mouse and keyboard operations.
gFocusMgr.setMouseCapture( this );
@@ -257,7 +264,6 @@ BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
return TRUE;
}
-
BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask )
{
LLFloater::handleKeyHere(key, mask );
@@ -301,7 +307,6 @@ void LLModalDialog::centerOnScreen()
centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY])));
}
-
// static
void LLModalDialog::onAppFocusLost()
{
@@ -333,6 +338,7 @@ void LLModalDialog::onAppFocusGained()
}
}
+// static
void LLModalDialog::shutdownModals()
{
// This method is only for use during app shutdown. ~LLModalDialog()