Merge branch 'hotfix-1.6.2' into develop-1.7

This commit is contained in:
Jinhao
2018-10-01 11:40:41 +08:00
3 changed files with 12 additions and 6 deletions

View File

@@ -973,7 +973,12 @@ namespace detail
case Expose:
if(msgwnd->visible && (msgwnd->root_graph->empty() == false))
{
nana::detail::platform_scope_guard lock;
nana::internal_scope_guard lock;
//Don't lock this scope using platform-scope-guard. Because it would cause the platform-scope-lock to be locked
//before the internal-scope-guard, and the order of locking would cause dead-lock.
//
//Locks this scope using internal-scope-guard is correct and safe. In the scope, the Xlib functions aren't called
//directly.
if(msgwnd->is_draw_through())
{
msgwnd->other.attribute.root->draw_through();

View File

@@ -303,7 +303,7 @@ namespace nana
extent_size.width = width_px;
for (auto & vsline : rs.vslines)
extent_size.height += vsline.extent_height_px;
extent_size.height += static_cast<size::value_type>(vsline.extent_height_px);
content_lines.emplace_back(std::move(rs.vslines));
@@ -891,7 +891,8 @@ namespace nana
if(graph_ptr->empty())
{
graph_ptr = &substitute;
graph_ptr->make({ 10, 10 });
substitute.make({ 10, 10 });
substitute.typeface(this->typeface());
}
return impl->renderer.measure(*graph_ptr, limited, impl->text_align, impl->text_align_v);