diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-25 13:18:45 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-25 13:18:45 +0300 |
commit | 19bf42ce996ea933dfbb234034ff317a7edd3bf0 (patch) | |
tree | 6595b7e635ae675abc44a146bd7e9abfe23caf6d | |
parent | ab2e695163f8712cd9beb21ecf3be1714243479e (diff) |
fix to prevent duplicate event processing
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 4 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 5 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 41 |
7 files changed, 34 insertions, 31 deletions
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index e7b3ecd9bc..314daf7696 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -790,7 +790,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) return 0;
}
- return 0;
+ return CSuper::WndProc_Message(msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -914,7 +914,7 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) break;
}
- return 0;
+ return CSuper::WndProc_Log(msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 69f8681857..c51e8da8f2 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1046,7 +1046,8 @@ LRESULT CSrmmWindow::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) DestroyMenu(hMenu);
return TRUE;
}
- return 0;
+
+ return CSuper::WndProc_Log(msg, wParam, lParam);
}
LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1120,7 +1121,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) InputAreaContextMenu(m_message.GetHwnd(), wParam, lParam, m_hContact);
return TRUE;
}
- return 0;
+ return CSuper::WndProc_Message(msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index d25fb396bb..d5af7d9743 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -1112,7 +1112,7 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) break; } - return 0; + return CSuper::WndProc_Log(msg, wParam, lParam); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -1459,7 +1459,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) return !CSkin::m_skinEnabled; } - return 0; + return CSuper::WndProc_Message(msg, wParam, lParam); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 8c026f4d54..5089dfaca3 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1938,7 +1938,7 @@ LRESULT CSrmmWindow::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) return TRUE;
}
- return 0;
+ return CSuper::WndProc_Log(msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -2182,7 +2182,8 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) ShowPopupMenu(m_message, pt);
return TRUE;
}
- return 0;
+
+ return CSuper::WndProc_Message(msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 58721993ba..d81fae0519 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -935,7 +935,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) break; } - return 0; + return CSuper::WndProc_Message(msg, wParam, lParam); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -978,7 +978,7 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) break; } - return 0; + return CSuper::WndProc_Log(msg, wParam, lParam); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index e4631281f8..0d23aeb323 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -849,7 +849,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) return 0;
}
- return 0;
+ return CSuper::WndProc_Message(msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index f5dd07a69e..01ef9a8063 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -125,36 +125,36 @@ static LRESULT CALLBACK Srmm_ButtonSubclassProc(HWND hwnd, UINT msg, WPARAM wPar ///////////////////////////////////////////////////////////////////////////////////////// -LRESULT CSrmmBaseDialog::WndProc_Log(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/) -{ - return 0; -} - static LRESULT CALLBACK stubLogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); if (pDlg != nullptr) - pDlg->WndProc_Log(msg, wParam, lParam); + return pDlg->WndProc_Log(msg, wParam, lParam); return mir_callNextSubclass(hwnd, stubLogProc, msg, wParam, lParam); } -///////////////////////////////////////////////////////////////////////////////////////// - -LRESULT CSrmmBaseDialog::WndProc_Message(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/) +LRESULT CSrmmBaseDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) { - return 0; + return mir_callNextSubclass(m_log.GetHwnd(), stubLogProc, msg, wParam, lParam); } +///////////////////////////////////////////////////////////////////////////////////////// + static LRESULT CALLBACK stubMessageProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); if (pDlg != nullptr) - pDlg->WndProc_Message(msg, wParam, lParam); + return pDlg->WndProc_Message(msg, wParam, lParam); return mir_callNextSubclass(hwnd, stubMessageProc, msg, wParam, lParam); } +LRESULT CSrmmBaseDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) +{ + return mir_callNextSubclass(m_message.GetHwnd(), stubMessageProc, msg, wParam, lParam); +} + ///////////////////////////////////////////////////////////////////////////////////////// // process mouse - hovering for the nickname list.fires events so the protocol can // show the userinfo - tooltip. @@ -266,6 +266,15 @@ static void CALLBACK ChatTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD) KillTimer(hwnd, idEvent); } +static LRESULT CALLBACK stubNicklistProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); + if (pDlg != nullptr) + return pDlg->WndProc_Nicklist(msg, wParam, lParam); + + return mir_callNextSubclass(hwnd, stubNicklistProc, msg, wParam, lParam); +} + LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam) { RECT rc; @@ -364,16 +373,8 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam } return 1; } - return 0; -} -static LRESULT CALLBACK stubNicklistProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); - if (pDlg != nullptr) - pDlg->WndProc_Nicklist(msg, wParam, lParam); - - return mir_callNextSubclass(hwnd, stubNicklistProc, msg, wParam, lParam); + return mir_callNextSubclass(m_nickList.GetHwnd(), stubNicklistProc, msg, wParam, lParam); } ///////////////////////////////////////////////////////////////////////////////////////// |