From f9e3caa345ddff77ede9b9a5e55e31209e1cc55d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 4 Jun 2016 20:20:57 +0300 Subject: Show hightlighted messages in chat also if tab active but window minimized or no input focus. --- src/gui/widgets/tabs/chat/chattab.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3-70-g09d2