summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/hotkeyhandler.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-20 15:55:30 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-20 15:55:30 +0300
commit81c4c58099694dec4a7234b6c6028d478f08262f (patch)
tree877739ace95c6e05a7671e86ab34817c06006a7a /plugins/TabSRMM/src/hotkeyhandler.cpp
parented3e48ddc7878f1ba5326088810bf8a45cdd06a6 (diff)
fixes #4686 (tabSRMM: group chat windows to use the same activation options like the private chats do)
Diffstat (limited to 'plugins/TabSRMM/src/hotkeyhandler.cpp')
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp11
1 files changed, 9 insertions, 2 deletions
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);
}
}
}