fix: remove pretarget handler before window destruction

This commit is contained in:
Jeremy Apthorp 2019-01-14 11:30:08 -08:00
parent 8122dd2c33
commit f115376595
2 changed files with 9 additions and 0 deletions

View file

@ -1216,6 +1216,14 @@ void NativeWindowViews::OnWidgetBoundsChanged(views::Widget* changed_widget,
}
}
void NativeWindowViews::OnWidgetDestroying(views::Widget* widget) {
#if defined(OS_LINUX)
aura::Window* window = GetNativeWindow();
if (window)
window->RemovePreTargetHandler(this);
#endif
}
void NativeWindowViews::DeleteDelegate() {
if (is_modal() && this->parent()) {
auto* parent = this->parent();