summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-04-14 12:34:19 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-04-14 12:34:19 +0300
commit2e8ecee52cda3e486fe1f1290163735b894a9025 (patch)
tree351ca49aa458df3af02abce8294b747f8aeb83d9 /src/core
parente879ff621a1d12b133e5ad0ed608cbd7ca542d25 (diff)
fixes various crashes on exit in StdMsg
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/src/chat_window.cpp4
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp2
-rw-r--r--src/core/stdmsg/src/msgs.h1
4 files changed, 10 insertions, 1 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index b51d4cff1a..7eee70faef 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -1191,6 +1191,10 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SetFocus(m_message.GetHwnd());
break;
+ case DM_CLOSETAB:
+ CloseTab();
+ break;
+
case DM_CASCADENEWWINDOW:
if ((HWND)wParam != m_pOwner->GetHwnd()) {
RECT rcThis, rcNew;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 3964004faa..675f0b7484 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -1411,6 +1411,10 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
break;
+ case DM_CLOSETAB:
+ CloseTab();
+ break;
+
case DM_STATUSICONCHANGE:
SendMessage(m_pOwner->m_hwndStatus, SB_SETTEXT, (SBT_OWNERDRAW | (SendMessage(m_pOwner->m_hwndStatus, SB_GETPARTS, 0, 0) - 1)), 0);
break;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 5944e33f7d..b335fe6c80 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -444,7 +444,7 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM)
int PreshutdownSendRecv(WPARAM, LPARAM)
{
- Srmm_Broadcast(WM_CLOSE, 0, 0);
+ Srmm_Broadcast(DM_CLOSETAB, 0, 0);
DeinitStatusIcons();
return 0;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h
index f1f84714fa..fea335010a 100644
--- a/src/core/stdmsg/src/msgs.h
+++ b/src/core/stdmsg/src/msgs.h
@@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define HM_DBEVENTADDED (WM_USER+12)
#define DM_CASCADENEWWINDOW (WM_USER+13)
#define DM_OPTIONSAPPLIED (WM_USER+14)
+#define DM_CLOSETAB (WM_USER+15)
#define DM_UPDATETITLE (WM_USER+16)
#define DM_APPENDTOLOG (WM_USER+17)
#define DM_NEWTIMEZONE (WM_USER+18)