diff options
author | George Hazan <ghazan@miranda.im> | 2018-06-03 22:35:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-06-03 22:35:20 +0300 |
commit | a4549ec2b353a0995bcfba17b7d42c047e7c8ee8 (patch) | |
tree | 061300126750e4865ef0bb5b48ddab4bc43d0416 /plugins/TabSRMM/src/chat_window.cpp | |
parent | 0fae00f05addee2e71081038b6700aa5eaeaf20b (diff) |
fixes #1401 (fixes inactive session detection)
Diffstat (limited to 'plugins/TabSRMM/src/chat_window.cpp')
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index e7e8faaa9f..9d7c6f9211 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -738,7 +738,7 @@ void CChatRoomDlg::AddLog() DM_AddDivider(); } else { - bool bInactive = (GetForegroundWindow() != m_pContainer->m_hwnd || GetActiveWindow() != m_pContainer->m_hwnd); + bool bInactive = !IsActive(); if (bInactive) DM_AddDivider(); else if (m_pContainer->m_hwndActive != m_hwnd) @@ -1404,7 +1404,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) break; case WM_INPUTLANGCHANGE: - if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == m_message.GetHwnd() && m_pContainer->m_hwndActive == m_hwnd && GetForegroundWindow() == m_pContainer->m_hwnd && GetActiveWindow() == m_pContainer->m_hwnd) { + if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == m_message.GetHwnd() && IsActive()) { DM_SaveLocale(wParam, lParam); m_message.SendMsg(EM_SETLANGOPTIONS, 0, (LPARAM)m_message.SendMsg(EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD); return 1; |