summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-22 18:55:16 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-22 18:55:16 +0300
commit0ff53148fe18ad476e47eae46e7ed6f3a8b56886 (patch)
treea0209bf090b2141f46c0b03f838f138a3a8d86df
parent8e6eec574c974340d503bf7db30bc47162574789 (diff)
unfotunately StdMsg depends on this code
-rw-r--r--src/mir_core/src/Windows/CCtrlPages.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mir_core/src/Windows/CCtrlPages.cpp b/src/mir_core/src/Windows/CCtrlPages.cpp
index 3af2d5667c..c449014821 100644
--- a/src/mir_core/src/Windows/CCtrlPages.cpp
+++ b/src/mir_core/src/Windows/CCtrlPages.cpp
@@ -152,22 +152,20 @@ void CCtrlPages::ActivatePage(int iPage)
if (info == nullptr || info->m_pDlg == nullptr)
return;
- if (info->m_pDlg != m_pActivePage) {
- if (m_pActivePage != nullptr)
- ShowWindow(m_pActivePage->GetHwnd(), SW_HIDE);
+ if (m_pActivePage != nullptr)
+ ShowWindow(m_pActivePage->GetHwnd(), SW_HIDE);
- m_pActivePage = info->m_pDlg;
- if (m_pActivePage->GetHwnd() && info->m_bScheduledResize) {
- RECT rc;
- GetClientRect(m_hwnd, &rc);
- TabCtrl_AdjustRect(m_hwnd, FALSE, &rc);
- SetWindowPos(m_pActivePage->GetHwnd(), nullptr, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_NOZORDER);
- }
-
- TabCtrl_SetCurSel(m_hwnd, iPage);
- ShowPage(m_pActivePage);
+ m_pActivePage = info->m_pDlg;
+ if (m_pActivePage->GetHwnd() && info->m_bScheduledResize) {
+ RECT rc;
+ GetClientRect(m_hwnd, &rc);
+ TabCtrl_AdjustRect(m_hwnd, FALSE, &rc);
+ SetWindowPos(m_pActivePage->GetHwnd(), nullptr, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_NOZORDER);
}
+ TabCtrl_SetCurSel(m_hwnd, iPage);
+ ShowPage(m_pActivePage);
+
::SendMessage(m_pActivePage->GetHwnd(), WM_MOUSEACTIVATE, 0, 0);
}