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 | |
parent | b121ac908e588b92edc61a47219e1d881912a75a (diff) |
CCtrlPages: flicker optimization
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 6 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/Windows/CCtrlPages.cpp | 2 |
3 files changed, 4 insertions, 6 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)
diff --git a/src/mir_core/src/Windows/CCtrlPages.cpp b/src/mir_core/src/Windows/CCtrlPages.cpp index c2a95553c5..0f3c15e024 100644 --- a/src/mir_core/src/Windows/CCtrlPages.cpp +++ b/src/mir_core/src/Windows/CCtrlPages.cpp @@ -264,7 +264,7 @@ void CCtrlPages::RemovePage(int iPage) void CCtrlPages::ShowPage(CDlgBase *pDlg)
{
if (pDlg->GetHwnd() == nullptr) {
- pDlg->SetParent(m_hwnd);
+ pDlg->SetParent(GetParent()->GetHwnd());
pDlg->Create();
RECT rc;
|