From 6b8a89823966b4216e695d4b540cd089a3a2f1e9 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Tue, 2 Apr 2019 01:19:07 +0800 Subject: [PATCH] improve fix 73c68def7ec2bb7d3af1a4370209cb862f66b408 --- source/gui/detail/window_layout.cpp | 4 ++++ source/gui/detail/window_manager.cpp | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/gui/detail/window_layout.cpp b/source/gui/detail/window_layout.cpp index 12b5f86f..d23d2d05 100644 --- a/source/gui/detail/window_layout.cpp +++ b/source/gui/detail/window_layout.cpp @@ -39,6 +39,10 @@ namespace nana } else _m_paint_glass_window(wd, (paint_operation::try_refresh == operation), req_refresh_children, false, true); + + //maproot and _m_paint_glass_window always copy the children graphics, therefore the mapping requester should + //be cleared to avoid redundant copying + wd->other.mapping_requester.clear(); } bool window_layout::maproot(core_window_t* wd, bool have_refreshed, bool req_refresh_children) diff --git a/source/gui/detail/window_manager.cpp b/source/gui/detail/window_manager.cpp index f7def397..e1510423 100644 --- a/source/gui/detail/window_manager.cpp +++ b/source/gui/detail/window_manager.cpp @@ -1086,12 +1086,12 @@ namespace detail if (wd->flags.action != wd->flags.action_before) this->map(wd, true); } + + //Map the requested children. + this->map_requester(wd); } else window_layer::paint(wd, paint_operation::try_refresh, refresh_tree); //only refreshing if it has an invisible parent - - //Map the requested children. - this->map_requester(wd); } else wd->other.mapping_requester.clear();