wm: free up weak pointers during view destruction

Fixes #1675
This commit is contained in:
Alexander Boettcher 2015-09-09 13:50:38 +02:00 committed by Christian Helmuth
parent 7db3e461ca
commit be9e157a3d

View File

@ -263,6 +263,8 @@ class Wm::Nitpicker::Top_level_view : public View,
{
if (_win_id.valid())
_window_registry.destroy(_win_id);
View::lock_for_destruction();
}
void _propagate_view_geometry() override { }
@ -349,6 +351,11 @@ class Wm::Nitpicker::Child_view : public View,
try_to_init_real_view();
}
~Child_view()
{
View::lock_for_destruction();
}
void _propagate_view_geometry() override
{
_real_nitpicker.enqueue<Command::Geometry>(_real_handle, _geometry);