summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/stdmsg/src/chat_window.cpp8
-rw-r--r--src/core/stdmsg/src/stdafx.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 75a34c72d2..f2391f0d42 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -952,6 +952,12 @@ void CChatRoomDlg::OnInitDialog()
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_OPEN);
}
+void CChatRoomDlg::OnClose()
+{
+ if (g_Settings.bTabsEnable)
+ SendMessage(GetParent(m_hwndParent), GC_REMOVETAB, 0, (LPARAM)this);
+}
+
void CChatRoomDlg::OnDestroy()
{
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSING);
@@ -1608,7 +1614,7 @@ LABEL_SHOWWINDOW:
if (g_Settings.bTabsEnable)
SendMessage(GetParent(m_hwndParent), GC_REMOVETAB, 0, (LPARAM)this);
Close();
- break;
+ return 0;
case GC_CHANGEFILTERFLAG:
m_si->iLogFilterFlags = lParam;
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index f39b6c0199..3e0276e705 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -197,6 +197,7 @@ public:
CChatRoomDlg(SESSION_INFO*);
virtual void OnInitDialog() override;
+ virtual void OnClose() override;
virtual void OnDestroy() override;
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;