From c9b740a178828eae5cc4be7ab054e5f26d3a27e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Sep 2023 14:34:07 +0300 Subject: MessageWindowEventData: useless structure removed --- plugins/Sessions/Src/Main.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/Sessions/Src') diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 4489df8646..ad71d5306f 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -205,19 +205,20 @@ static void DelFromCurSession(MCONTACT hContact) } } -static int OnSrmmWindowEvent(WPARAM, LPARAM lParam) +static int OnSrmmWindowEvent(WPARAM uType, LPARAM lParam) { - MessageWindowEventData *MWeventdata = (MessageWindowEventData*)lParam; - if (MWeventdata->uType == MSG_WINDOW_EVT_OPEN) { - AddToCurSession(MWeventdata->hContact); + auto *pDlg = (CSrmmBaseDialog *)lParam; + + if (uType == MSG_WINDOW_EVT_OPEN) { + AddToCurSession(pDlg->m_hContact); if (g_bCrashRecovery) - g_plugin.setByte(MWeventdata->hContact, "wasInLastSession", 1); + g_plugin.setByte(pDlg->m_hContact, "wasInLastSession", 1); } - else if (MWeventdata->uType == MSG_WINDOW_EVT_CLOSE) { + else if (uType == MSG_WINDOW_EVT_CLOSE) { if (!DONT) - DelFromCurSession(MWeventdata->hContact); + DelFromCurSession(pDlg->m_hContact); if (g_bCrashRecovery) - g_plugin.setByte(MWeventdata->hContact, "wasInLastSession", 0); + g_plugin.setByte(pDlg->m_hContact, "wasInLastSession", 0); } return 0; -- cgit v1.2.3