fix bug that window_position returns the pos of WM reparenting frame

This commit is contained in:
Jinhao
2018-08-01 07:31:02 +08:00
parent df5fda9096
commit 1339658c4c
7 changed files with 97 additions and 16 deletions

View File

@@ -99,7 +99,7 @@ namespace nana
//Check scroll_area to avoiding division by zero.
if (scroll_area)
metrics_.value = pos * (static_cast<double>(value_max) / scroll_area); //converting to double to avoid overflow.
metrics_.value = static_cast<std::size_t>(pos * (static_cast<double>(value_max) / scroll_area)); //converting to double to avoid overflow.
if (metrics_.value < value_max)
{