diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-04 20:20:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-04 20:20:57 +0300 |
commit | f9e3caa345ddff77ede9b9a5e55e31209e1cc55d (patch) | |
tree | c7782d85a3b0376a804676ff583d7a12af573453 | |
parent | 2fa36b8aff1d6275cda110f1ad1b0ec2df1e9a63 (diff) | |
download | plus-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.tar.gz plus-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.tar.bz2 plus-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.tar.xz plus-f9e3caa345ddff77ede9b9a5e55e31209e1cc55d.zip |
Show hightlighted messages in chat also if tab active but window minimized or no input focus.
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.cpp | 14 |
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) { |