From c3d846f6cb7f8013d9ff95b302f16742b6e18790 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 11 Mar 2018 19:53:19 +0300 Subject: fixes #1181 (TabSRMM: bug with event handling) --- plugins/TabSRMM/src/chat_tools.cpp | 2 +- plugins/TabSRMM/src/generic_msghandlers.cpp | 2 +- plugins/TabSRMM/src/globals.cpp | 14 -------------- plugins/TabSRMM/src/globals.h | 1 - 4 files changed, 2 insertions(+), 17 deletions(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index fe37c56b93..bde0070409 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -243,7 +243,7 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p) // autoswitch tab.. if (p->bMustAutoswitch) { - if ((IsIconic(dat->m_pContainer->m_hwnd)) && !IsZoomed(dat->m_pContainer->m_hwnd) && PluginConfig.haveAutoSwitch() && dat->m_pContainer->m_hwndActive != si->pDlg->GetHwnd()) { + if ((IsIconic(dat->m_pContainer->m_hwnd)) && !IsZoomed(dat->m_pContainer->m_hwnd) && PluginConfig.m_bAutoSwitchTabs && dat->m_pContainer->m_hwndActive != si->pDlg->GetHwnd()) { int iItem = GetTabIndexFromHWND(hwndTab, si->pDlg->GetHwnd()); if (iItem >= 0) { TabCtrl_SetCurSel(hwndTab, iItem); diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index e9c5a0cf6c..38f59af9b9 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1278,7 +1278,7 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) // autoswitch tab if option is set AND container is minimized (otherwise, we never autoswitch) // never switch for status changes... if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) { - if (PluginConfig.haveAutoSwitch() && m_pContainer->m_hwndActive != m_hwnd) { + if (PluginConfig.m_bAutoSwitchTabs && m_pContainer->m_hwndActive != m_hwnd) { if ((IsIconic(m_pContainer->m_hwnd) && !IsZoomed(m_pContainer->m_hwnd)) || (PluginConfig.m_bHideOnClose && !IsWindowVisible(m_pContainer->m_hwnd))) { int iItem = GetTabIndexFromHWND(GetParent(m_hwnd), m_hwnd); if (iItem >= 0) { diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 7da147b615..ca23d4f1ed 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -580,17 +580,3 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c) dbei.szModule = (char*)c->getProto(); dat->StreamInEvents(0, 1, 1, &dbei); } - -///////////////////////////////////////////////////////////////////////////////////////// -// on Windows 7, when using new task bar features (grouping mode and per tab -// previews), autoswitching does not work relieably, so it is disabled. -// -// @return: true if configuration dictates autoswitch - -bool CGlobals::haveAutoSwitch() -{ - if (m_bIsWin7 && m_useAeroPeek && !CSkin::m_skinEnabled) - return false; - - return m_bAutoSwitchTabs; -} diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index e6aca29cc8..1d8a9deba6 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -60,7 +60,6 @@ public: void reloadSettings(bool fReloadSkins = true); void hookSystemEvents(); - bool haveAutoSwitch(); const HMENU getMenuBar(); -- cgit v1.2.3