diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-30 13:50:15 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-30 13:50:45 -0400 |
commit | a9341bd5f03dad86161786c1f764471b23273601 (patch) | |
tree | 4465501fa58397365465c0fa1ba0a07f4b14adca /gtk2_ardour/ardour_dialog.cc | |
parent | 63e4c37deffbedacf0a81359fd4615774c227556 (diff) |
improve relationship between ArdourDialog and Splash on OS X, where window restacking doesn't really work the way we need it to. more complex than anticipated because it seems that destroying a Gtk::Dialog does not emit its hide() or unmap() or unmap_event() signals
Diffstat (limited to 'gtk2_ardour/ardour_dialog.cc')
-rw-r--r-- | gtk2_ardour/ardour_dialog.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc index c0e1708781..6775a70953 100644 --- a/gtk2_ardour/ardour_dialog.cc +++ b/gtk2_ardour/ardour_dialog.cc @@ -34,12 +34,14 @@ sigc::signal<void> ArdourDialog::CloseAllDialogs; ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator) : Dialog (title, modal, use_seperator) + , _splash_pushed (false) { init (); } ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool use_seperator) : Dialog (title, parent, modal, use_seperator) + , _splash_pushed (false) { init (); set_position (Gtk::WIN_POS_CENTER_ON_PARENT); @@ -47,6 +49,13 @@ ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool ArdourDialog::~ArdourDialog () { + if (_splash_pushed) { + Splash* spl = Splash::instance(); + + if (spl) { + spl->pop_front(); + } + } } bool @@ -73,15 +82,16 @@ ArdourDialog::on_unmap () void ArdourDialog::on_show () { + Dialog::on_show (); + // never allow the splash screen to obscure any dialog Splash* spl = Splash::instance(); - if (spl) { + if (spl && spl->is_visible()) { spl->pop_back_for (*this); + _splash_pushed = true; } - - Dialog::on_show (); } void |