fix issue scrolling in nested_form causes freezing(#505)

This commit is contained in:
Jinhao 2020-02-13 11:56:35 +08:00
parent cfad078740
commit 75d760266a

View File

@ -1,7 +1,7 @@
/** /**
* A Bedrock Implementation * A Bedrock Implementation
* Nana C++ Library(http://www.nanapro.org) * Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com) * Copyright(C) 2003-2020 Jinhao(cnjinhao@hotmail.com)
* *
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
@ -1191,9 +1191,7 @@ namespace detail
} }
else if (pointer_wd != root_window) else if (pointer_wd != root_window)
{ {
DWORD pid = 0; if (::GetWindowThreadProcessId(pointer_wd, nullptr) != ::GetCurrentThreadId())
::GetWindowThreadProcessId(pointer_wd, &pid);
if (pid == ::GetCurrentProcessId())
::PostMessage(pointer_wd, message, wParam, lParam); ::PostMessage(pointer_wd, message, wParam, lParam);
} }
} }