From 51d67b220e416aabac680c66e1be306f140221f2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 17 Jan 2018 17:46:45 +0300 Subject: TabSRMM: - fixed: status icons in group chats aren't changed when needed - the status bar redraw procedure seriously optimized --- plugins/TabSRMM/src/container.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugins/TabSRMM/src/container.cpp') diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 9cf94f82e6..c01dec57bb 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -41,6 +41,12 @@ static TContainerData* TSAPI RemoveContainerFromList(TContainerData*); static bool fForceOverlayIcons = false; +void TContainerData::InitRedraw() +{ + ::KillTimer(m_hwnd, (UINT_PTR)this); + ::SetTimer(m_hwnd, (UINT_PTR)this, 100, nullptr); +} + void TContainerData::UpdateTabs() { HWND hwndTab = GetDlgItem(m_hwnd, IDC_MSGTABS); @@ -466,6 +472,15 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, } break; + case WM_TIMER: + if (wParam == (WPARAM)pContainer && pContainer->hwndStatus) { + SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0); + SendMessage(pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0); + InvalidateRect(pContainer->hwndStatus, nullptr, TRUE); + KillTimer(hwndDlg, wParam); + } + break; + case 0xae: // must be some undocumented message - seems it messes with the title bar... if (CSkin::m_frameSkins) return 0; -- cgit v1.2.3