improve dockable place
add a new API::at_safe_place()
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user