diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-21 13:17:19 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-21 13:17:19 +0000 |
commit | dc16fa8c5fa2e477b6ce896b8eb237462735baae (patch) | |
tree | 0decd239db25aa48a16ec6b4da49a1f678f3cedc /src | |
parent | 6465dd41cc06b5952e77ccc72396627abf385a17 (diff) |
fix for window flashing in StdChat & Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@7809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdchat/src/main.cpp | 16 | ||||
-rw-r--r-- | src/modules/chat/tools.cpp | 4 |
2 files changed, 16 insertions, 4 deletions
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;
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index a553c4c916..5574f49e86 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -293,8 +293,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight ci.DoTrayIcon(si, gce);
if (bInactive || !g_Settings->bPopupInactiveOnly)
ci.DoPopup(si, gce);
- if (ci.OnFlashWindow)
- ci.OnFlashWindow(si, bInactive);
+ if (ci.OnFlashHighlight)
+ ci.OnFlashHighlight(si, bInactive);
return TRUE;
}
|