From 315e30ceaec21a628df017db96c25d6a4d88ecc5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Mar 2024 13:17:27 +0300 Subject: fixes #4275 (any SRMM marks an event as read even if the window isn't active) --- include/m_database.h | 3 ++- include/m_srmm_int.h | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/m_database.h b/include/m_database.h index 4dd9e5dd8e..e29b04fa2e 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -695,10 +695,11 @@ namespace DB explicit EventInfo(MEVENT hEvent, bool bFetchBlob = true); ~EventInfo(); - bool fetch(bool bFetchBlob = true); + bool fetch(MEVENT hEvent, bool bFetchBlob = true); void unload(); void wipeNotify(); + __forceinline MEVENT getEvent() const { return m_hEvent; } __forceinline operator bool() const { return m_bValid; } bool isSrmm() const; // could be displayed in a SRMM window diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 712039e7d7..d1ef3109b5 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define M_SRMM_INT_H__ 1 #include +#include #include @@ -287,6 +288,8 @@ class MIR_APP_EXPORT CSrmmBaseDialog : public CDlgBase void OnNickListTimer(CTimer *); void OnRedrawTimer(CTimer *); + std::vector m_arDisplayedEvents; + protected: CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, struct SESSION_INFO *si = nullptr); @@ -345,12 +348,13 @@ public: int m_iLogFilterFlags; bool m_bFilterEnabled, m_bNicklistEnabled, m_bReadOnly = false; bool m_bFGSet, m_bBGSet; - bool m_bInMenu; + bool m_bInMenu, m_bActive; COLORREF m_iFG, m_iBG; CTimer timerFlash, timerType, timerNickList, timerRedraw; void ClearLog(); bool IsSuitableEvent(const LOGINFO &lin) const; + void MarkEventRead(const DB::EventInfo &dbei); void RedrawLog(); void ScheduleRedrawLog(); void SetMessageText(const wchar_t *pwszText, bool bAppend = true); -- cgit v1.2.3