summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-04 20:20:57 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-04 20:20:57 +0300
commitf9e3caa345ddff77ede9b9a5e55e31209e1cc55d (patch)
treec7782d85a3b0376a804676ff583d7a12af573453 /src
parent2fa36b8aff1d6275cda110f1ad1b0ec2df1e9a63 (diff)
downloadmv-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.tar.gz
mv-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.tar.bz2
mv-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.tar.xz
mv-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.zip
Show hightlighted messages in chat also if tab active but window minimized or no input focus.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index 3bc323e92..67b97dd99 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -310,7 +310,10 @@ void ChatTab::chatLog(std::string line,
if (!tabArea)
return;
- if (this != tabArea->getSelectedTab())
+ const bool notFocused = WindowManager::getIsMinimized() ||
+ (!settings.mouseFocused && !settings.inputFocused);
+
+ if (this != tabArea->getSelectedTab() || notFocused)
{
if (getFlash() == 0)
{
@@ -331,11 +334,10 @@ void ChatTab::chatLog(std::string line,
}
}
- if ((getAllowHighlight() || own == ChatMsgType::BY_GM)
- && (this != tabArea->getSelectedTab()
- || (WindowManager::getIsMinimized()
- || (!settings.mouseFocused
- && !settings.inputFocused))))
+ if ((getAllowHighlight() ||
+ own == ChatMsgType::BY_GM) &&
+ (this != tabArea->getSelectedTab() ||
+ notFocused))
{
if (own == ChatMsgType::BY_GM)
{