diff options
author | Robin Gareus <robin@gareus.org> | 2018-11-29 14:25:22 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-11-29 14:25:22 +0100 |
commit | e42699600b92db69a428979dc0412c96f7494141 (patch) | |
tree | dd220f5a98060dcb446733f3013eaed0b6596e87 /gtk2_ardour/ardour_dialog.cc | |
parent | fc24b9f0b7027fe516565eae85857be06d1f1e1d (diff) |
Delete temporary Window Proxy for dialogs
There are two cases:
(A) Proxy is created first, dialog is created later on demand
(B) Dialog is created and directly registers its window as proxy
In (B) the dialog is usually on the stack and destroyed when the
ArdourDialog instances leaves scope. In that case ~ArdourDialog()
is called and the proxy remained.
Destroying the proxy does destroy the registered window in ~WindowProxy()
If ArdourDialog's d'tor itself deletes the proxy it would recurse into
itself. Existing APIs e.g. drop_window() likewise delete the window and
cannot be safely called from ~ArdourDialog.
Diffstat (limited to 'gtk2_ardour/ardour_dialog.cc')
-rw-r--r-- | gtk2_ardour/ardour_dialog.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc index 1c9da0112f..68f388682a 100644 --- a/gtk2_ardour/ardour_dialog.cc +++ b/gtk2_ardour/ardour_dialog.cc @@ -45,6 +45,7 @@ ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator) ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool use_seperator) : Dialog (title, parent, modal, use_seperator) + , proxy (0) , _splash_pushed (false) { init (); @@ -56,6 +57,7 @@ ArdourDialog::~ArdourDialog () pop_splash (); Keyboard::the_keyboard().focus_out_window (0, this); WM::Manager::instance().remove (proxy); + proxy->explicit_delete (); } void |