From c4f2f0a8c643304f73cdbea1299c00cf19e8986c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 1 Feb 2019 15:46:41 +0300 Subject: fixes #1762 (StdMsg: Text selection bug in the message log since 0.95.8) --- src/core/stdmsg/src/msgdialog.cpp | 1 - src/core/stdmsg/src/msgs.cpp | 15 ++++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 7007811647..3702f21c0c 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -311,7 +311,6 @@ void CSrmmWindow::OnDestroy() void CSrmmWindow::OnActivate() { SetupStatusBar(); - SetFocus(m_message.GetHwnd()); UpdateTitle(); UpdateLastMessage(); StopFlash(); diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index a2c979839c..ac88cf3e9c 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -46,8 +46,14 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_ACTIVATE: - if (LOWORD(wParam) == WA_ACTIVE) - OnActivate(); + if (LOWORD(wParam) != WA_ACTIVE) + break; + + SetFocus(m_message.GetHwnd()); + __fallthrough; + + case WM_MOUSEACTIVATE: + OnActivate(); break; case WM_TIMER: @@ -58,11 +64,6 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) m_nFlash++; } break; - - case WM_MOUSEACTIVATE: - OnActivate(); - SetFocus(m_message.GetHwnd()); - break; } return CSuper::DlgProc(uMsg, wParam, lParam); -- cgit v1.2.3