Merge branch 'hotfix-1.6.2' into develop-1.7
This commit is contained in:
@@ -211,10 +211,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#undef _nana_std_optional
|
#undef _nana_std_optional
|
||||||
#if ((defined(_MSC_VER) && (_MSC_VER >= 1912) && ((!defined(_MSVC_LANG)) || _MSVC_LANG < 201703))) || \
|
#if ((defined(_MSC_VER) && ((!defined(_MSVC_LANG)) || _MSVC_LANG < 201703))) || \
|
||||||
((__cplusplus < 201703L) || \
|
((!defined(_MSC_VER)) && ((__cplusplus < 201703L) || \
|
||||||
(defined(__clang__) && (__clang_major__ * 100 + __clang_minor__ < 400)) || \
|
(defined(__clang__) && (__clang_major__ * 100 + __clang_minor__ < 400)) || \
|
||||||
(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 701)) \
|
(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 701))) \
|
||||||
)
|
)
|
||||||
# define _nana_std_optional
|
# define _nana_std_optional
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -973,7 +973,12 @@ namespace detail
|
|||||||
case Expose:
|
case Expose:
|
||||||
if(msgwnd->visible && (msgwnd->root_graph->empty() == false))
|
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())
|
if(msgwnd->is_draw_through())
|
||||||
{
|
{
|
||||||
msgwnd->other.attribute.root->draw_through();
|
msgwnd->other.attribute.root->draw_through();
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ namespace nana
|
|||||||
extent_size.width = width_px;
|
extent_size.width = width_px;
|
||||||
|
|
||||||
for (auto & vsline : rs.vslines)
|
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));
|
content_lines.emplace_back(std::move(rs.vslines));
|
||||||
|
|
||||||
@@ -891,7 +891,8 @@ namespace nana
|
|||||||
if(graph_ptr->empty())
|
if(graph_ptr->empty())
|
||||||
{
|
{
|
||||||
graph_ptr = &substitute;
|
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);
|
return impl->renderer.measure(*graph_ptr, limited, impl->text_align, impl->text_align_v);
|
||||||
|
|||||||
Reference in New Issue
Block a user