improve support of opengl for Linux

This commit is contained in:
Jinhao
2018-05-29 05:45:57 +08:00
parent 6a66b03663
commit d5f8f8b305
3 changed files with 38 additions and 6 deletions

View File

@@ -911,11 +911,18 @@ namespace detail
case Expose:
if(msgwnd->visible && (msgwnd->root_graph->empty() == false))
{
nana::detail::platform_scope_guard psg;
//Don't copy root_graph to the window directly, otherwise the edge nimbus effect will be missed.
::nana::rectangle update_area(xevent.xexpose.x, xevent.xexpose.y, xevent.xexpose.width, xevent.xexpose.height);
if (!update_area.empty())
msgwnd->drawer.map(reinterpret_cast<window>(msgwnd), true, &update_area);
nana::detail::platform_scope_guard lock;
if(msgwnd->is_draw_through())
{
msgwnd->other.attribute.root->draw_through();
}
else
{
//Don't copy root_graph to the window directly, otherwise the edge nimbus effect will be missed.
::nana::rectangle update_area(xevent.xexpose.x, xevent.xexpose.y, xevent.xexpose.width, xevent.xexpose.height);
if (!update_area.empty())
msgwnd->drawer.map(reinterpret_cast<window>(msgwnd), true, &update_area);
}
}
break;
case KeyPress: