summaryrefslogtreecommitdiff
path: root/protocols/IRCG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-12 20:03:12 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-12 20:03:12 +0300
commitfbf7ea850b236609396c59636926d74db1278d8d (patch)
tree050ac97b14398a4b98c5e30b3c318251306b028c /protocols/IRCG
parentfb4c135b8674a43dd3e49c7bfc71b3d7b83f03ca (diff)
fixes #4044 (IRC: окно настроек канала создаётся на заднем плане)
Diffstat (limited to 'protocols/IRCG')
-rw-r--r--protocols/IRCG/src/input.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp
index f5a5499348..2fd51e9fd1 100644
--- a/protocols/IRCG/src/input.cpp
+++ b/protocols/IRCG/src/input.cpp
@@ -421,17 +421,19 @@ BOOL CIrcProto::DoHardcodedCommand(CMStringW text, wchar_t *window, MCONTACT hCo
}
if (command == L"/channelmanager") {
- if (window && !hContact && IsChannel(window)) {
- if (IsConnected()) {
- if (m_managerDlg != nullptr) {
- SetActiveWindow(m_managerDlg->GetHwnd());
- m_managerDlg->Close();
- }
- else {
- m_managerDlg = new CManagerDlg(this);
- m_managerDlg->Show();
- m_managerDlg->InitManager(1, window);
- }
+ if (window && !hContact && IsChannel(window) && IsConnected()) {
+ if (m_managerDlg != nullptr) {
+ SetActiveWindow(m_managerDlg->GetHwnd());
+ m_managerDlg->Close();
+ }
+ else {
+ m_managerDlg = new CManagerDlg(this);
+ if (auto *si = Chat_Find(window, m_szModuleName))
+ if (si->pDlg)
+ m_managerDlg->SetParent(si->pDlg->GetHwnd());
+
+ m_managerDlg->Show();
+ m_managerDlg->InitManager(1, window);
}
}