improve dockable place

add a new API::at_safe_place()
This commit is contained in:
Jinhao
2015-09-20 23:21:44 +08:00
parent 5d2127e613
commit 460490040e
10 changed files with 181 additions and 13 deletions

View File

@@ -1717,13 +1717,27 @@ namespace nana
}
void notify_move_stopped()
void notify_move_stopped() override
{
if (_m_dockable() && dockable_field && dockable_field->dockarea)
dockable_field->dockarea->dock();
indicator_.docker.reset();
}
void request_close() override
{
auto window_handle = dockable_field->dockarea->handle();
//a workaround for capture
auto ptr = dockable_field->dockarea.release();
API::at_safe_place(window_handle, [this, ptr]
{
decltype(dockable_field->dockarea) del(ptr);
});
API::close_window(window_handle);
}
private:
bool _m_indicator() const
{