diff options
author | George Hazan <ghazan@miranda.im> | 2017-07-10 15:52:33 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-07-10 15:52:33 +0300 |
commit | 18873004444063ae98a9e7fc9214bd3edaa146a7 (patch) | |
tree | 4dbc9a5c493df19daf970881fbea1a5d8924b843 /src | |
parent | 8c30ca09319acad6a0b8cc56b85e2183d4edeed0 (diff) |
StdMsg:
- definitely fixes #808;
- must fix #797 as well, but I can't test it
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 8 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index d4c501b863..496ee0664b 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1152,7 +1152,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (DbEventIsShown(&dbei)) {
// Sounds *only* for sent messages, not for custom events
if (isMessage && !isSent) {
- if (GetForegroundWindow() == m_hwnd)
+ if (GetForegroundWindow() == m_pOwner->GetHwnd())
SkinPlaySound("RecvMsgActive");
else
SkinPlaySound("RecvMsgInactive");
@@ -1168,7 +1168,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) // Flash window *only* for messages, not for custom events
if (isMessage && !isSent) {
- if (GetActiveWindow() == m_hwnd && GetForegroundWindow() == m_hwnd) {
+ if (GetActiveWindow() == m_pOwner->GetHwnd() && GetForegroundWindow() == m_pOwner->GetHwnd()) {
if (GetWindowLongPtr(m_log.GetHwnd(), GWL_STYLE) & WS_VSCROLL) {
SCROLLINFO si = {};
si.cbSize = sizeof(si);
@@ -1207,7 +1207,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (m_bShowTyping) {
if (m_nTypeSecs) {
m_nTypeSecs--;
- if (GetForegroundWindow() == m_hwnd)
+ if (GetForegroundWindow() == m_pOwner->GetHwnd())
SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0);
}
else {
@@ -1228,7 +1228,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) SendMessage(m_pOwner->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)szBuf);
SendMessage(m_pOwner->m_hwndStatus, SB_SETICON, 0, (LPARAM)hTyping);
- if (g_dat.bShowTypingWin && GetForegroundWindow() != m_hwnd) {
+ if (g_dat.bShowTypingWin && GetForegroundWindow() != m_pOwner->GetHwnd()) {
HICON hIcon = (HICON)SendMessage(m_hwnd, WM_GETICON, ICON_SMALL, 0);
SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hTyping);
IcoLib_ReleaseIcon(hIcon);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index b335fe6c80..15d1800da0 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -69,7 +69,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) SkinPlaySound("RecvMsgActive");
}
else {
- if (GetForegroundWindow() == hwnd)
+ if (GetForegroundWindow() == GetParent(hwnd))
SkinPlaySound("RecvMsgActive");
else
SkinPlaySound("RecvMsgInactive");
|