From 81c4c58099694dec4a7234b6c6028d478f08262f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 20 Sep 2024 15:55:30 +0300 Subject: fixes #4686 (tabSRMM: group chat windows to use the same activation options like the private chats do) --- plugins/TabSRMM/src/hotkeyhandler.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'plugins/TabSRMM/src/hotkeyhandler.cpp') diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index c7caef5c92..706a3d6192 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -225,7 +225,14 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP break; case DM_CREATECONTAINER: - AutoCreateWindow(wParam, lParam); + if (!AutoCreateWindow(0, wParam, lParam)) { + // no window created, simply add an unread event to contact list + DB::EventInfo dbei(lParam, false); + if (dbei && !(dbei.flags & DBEF_READ)) { + AddUnreadContact(wParam); + Srmm_AddEvent(wParam, lParam); + } + } break; case DM_DOCREATETAB: @@ -244,7 +251,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (szProto != nullptr && Contact::IsGroupChat(lParam, szProto)) ShowRoom((TContainerData*)wParam, SM_FindSessionByHCONTACT(lParam)); else - CreateNewTabForContact((TContainerData*)wParam, lParam, true, true, false); + CreateNewTabForContact((TContainerData*)wParam, lParam, true, true); } } } -- cgit v1.2.3