From dc16fa8c5fa2e477b6ce896b8eb237462735baae Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Jan 2014 13:17:19 +0000 Subject: fix for window flashing in StdChat & Scriver git-svn-id: http://svn.miranda-ng.org/main/trunk@7809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdchat/src/main.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/core/stdchat') diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 61be5168ad..fad58d97e2 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -229,17 +229,28 @@ static void OnSetTopic(SESSION_INFO *si) g_TabSession.ptszTopic = si->ptszTopic; } -static void OnFlashWindow(SESSION_INFO *si, int bInactive) +static void OnFlashHighlight(SESSION_INFO *si, int bInactive) { if (!bInactive) return; - + if (!g_Settings.bTabsEnable && si->hWnd && g_Settings.bFlashWindowHighlight) SetTimer(si->hWnd, TIMERID_FLASHWND, 900, NULL); if (g_Settings.bTabsEnable && g_TabSession.hWnd) SendMessage(g_TabSession.hWnd, GC_SETMESSAGEHIGHLIGHT, 0, (LPARAM)si); } +static void OnFlashWindow(SESSION_INFO *si, int bInactive) +{ + if (!bInactive) + return; + + if (!g_Settings.bTabsEnable && si->hWnd && g_Settings.bFlashWindow) + SetTimer(si->hWnd, TIMERID_FLASHWND, 900, NULL); + if (g_Settings.bTabsEnable && g_TabSession.hWnd) + SendMessage(g_TabSession.hWnd, GC_SETTABHIGHLIGHT, 0, (LPARAM)si); +} + static BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce) { if (gce->pDest->iType & g_Settings.dwTrayIconFlags) @@ -349,6 +360,7 @@ extern "C" __declspec(dllexport) int Load(void) pci->OnLoadSettings = OnLoadSettings; pci->OnSetStatusBar = OnSetStatusBar; pci->OnFlashWindow = OnFlashWindow; + pci->OnFlashHighlight = OnFlashHighlight; pci->ShowRoom = ShowRoom; pci->DoPopup = DoPopup; -- cgit v1.2.3