diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-22 15:17:34 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-22 15:17:43 +0300 |
commit | a7ef6936c39f27ae844712c549ad5d5bc5a19015 (patch) | |
tree | eedc120827692891449b1597ca8111ea2672f4d8 /src/core/stdmsg | |
parent | b121ac908e588b92edc61a47219e1d881912a75a (diff) |
CCtrlPages: flicker optimization
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 6 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index 6e153aeef9..0a3933204c 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -151,10 +151,8 @@ static void ShowRoom(SESSION_INFO *si) // Do we need to create a window?
if (si->pDlg == nullptr) {
CTabbedWindow *pContainer = GetContainer();
- if (g_Settings.bTabsEnable) {
+ if (g_Settings.bTabsEnable)
pContainer->AddPage(si);
- PostMessage(pContainer->GetHwnd(), WM_SIZE, 0, 0);
- }
else {
CMsgDialog *pDlg = pContainer->m_pEmbed = new CMsgDialog(pContainer, si);
pContainer->Create();
@@ -162,8 +160,8 @@ static void ShowRoom(SESSION_INFO *si) pDlg->Create();
pContainer->Show();
pContainer->FixTabIcons(pDlg);
- PostMessage(pContainer->GetHwnd(), WM_SIZE, 0, 0);
}
+ PostMessage(pContainer->GetHwnd(), WM_SIZE, 0, 0);
if (si->iType != GCW_SERVER)
si->pDlg->UpdateNickList();
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index e57543fac0..8bc0d6cc3d 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -353,7 +353,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton) m_autoClose = CLOSE_ON_OK;
}
else if (g_plugin.bAutoMin)
- ::ShowWindow(GetParent(m_hwndParent), SW_MINIMIZE);
+ ::ShowWindow(m_hwndParent, SW_MINIMIZE);
}
else {
if (g_plugin.bAutoClose)
|