fix bug that nested_form mistakely renders sibling as its child

This commit is contained in:
Jinhao 2018-08-15 23:07:38 +08:00
parent c6f5dc0f1b
commit 841fa0812c

View File

@ -166,10 +166,18 @@ namespace nana
if (!cover->visible)
continue;
if (is_wd_root ?
(category::flags::root == cover->other.category)
:
((category::flags::root != cover->other.category) && (nullptr == cover->effect.bground)))
if (is_wd_root)
{
if(category::flags::root == cover->other.category)
{
if (overlap(vis_rect, rectangle{ native_interface::window_position(cover->root), cover->dimension }, block.r))
{
block.window = cover;
blocks.push_back(block);
}
}
}
else if((category::flags::root != cover->other.category) && (nullptr == cover->effect.bground))
{
if (overlap(vis_rect, rectangle{ cover->pos_root, cover->dimension }, block.r))
{