Delete temporary Window Proxy for dialogs
authorRobin Gareus <robin@gareus.org>
Thu, 29 Nov 2018 13:25:22 +0000 (14:25 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 29 Nov 2018 13:25:22 +0000 (14:25 +0100)
commite42699600b92db69a428979dc0412c96f7494141
treedd220f5a98060dcb446733f3013eaed0b6596e87
parentfc24b9f0b7027fe516565eae85857be06d1f1e1d
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.
gtk2_ardour/ardour_dialog.cc
gtk2_ardour/window_manager.cc
gtk2_ardour/window_manager.h