diff options
Diffstat (limited to 'views/window')
-rwxr-xr-x[-rw-r--r--] | views/window/dialog_client_view.cc | 8 | ||||
-rw-r--r-- | views/window/window_gtk.cc | 5 | ||||
-rw-r--r-- | views/window/window_gtk.h | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc index 40355d4..64c4677 100644..100755 --- a/views/window/dialog_client_view.cc +++ b/views/window/dialog_client_view.cc @@ -251,14 +251,10 @@ bool DialogClientView::CanClose() const { } void DialogClientView::WindowClosing() { -#if defined(OS_WIN) FocusManager* focus_manager = GetFocusManager(); DCHECK(focus_manager); if (focus_manager) focus_manager->RemoveFocusChangeListener(this); -#else - NOTIMPLEMENTED(); -#endif ClientView::WindowClosing(); } @@ -306,16 +302,12 @@ void DialogClientView::ViewHierarchyChanged(bool is_add, View* parent, ShowDialogButtons(); ClientView::ViewHierarchyChanged(is_add, parent, child); -#if defined(OS_WIN) FocusManager* focus_manager = GetFocusManager(); // Listen for focus change events so we can update the default button. DCHECK(focus_manager); // bug #1291225: crash reports seem to indicate it // can be NULL. if (focus_manager) focus_manager->AddFocusChangeListener(this); -#else - NOTIMPLEMENTED(); -#endif // The "extra view" must be created and installed after the contents view // has been inserted into the view hierarchy. diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index a3a3192..c17df87 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -451,4 +451,9 @@ void WindowGtk::SizeWindowToDefault(GtkWindow* parent) { SetBounds(bounds, NULL); } +void WindowGtk::OnDestroy() { + non_client_view_->WindowClosing(); + WidgetGtk::OnDestroy(); +} + } // namespace views diff --git a/views/window/window_gtk.h b/views/window/window_gtk.h index f7fffc7..7829e28 100644 --- a/views/window/window_gtk.h +++ b/views/window/window_gtk.h @@ -78,6 +78,8 @@ class WindowGtk : public WidgetGtk, public Window { // Initializes the window to the passed in bounds. void Init(GtkWindow* parent, const gfx::Rect& bounds); + virtual void OnDestroy(); + private: static gboolean CallConfigureEvent(GtkWidget* widget, GdkEventConfigure* event, |