Yet Another Splash Push/Pop Fix

Don't explicitly `show()` the splash when a message arrives.
On macOS and Windows the splash is not z-axis re-stacked but
hidden. Calling show() makes it visible again.
This commit is contained in:
Robin Gareus 2021-06-25 19:50:36 +02:00
parent b01fe8b0e4
commit f715edf7bc
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 7 additions and 7 deletions

View file

@ -118,6 +118,7 @@ void
ArdourDialog::on_unmap () ArdourDialog::on_unmap ()
{ {
Keyboard::the_keyboard().leave_window (0, this); Keyboard::the_keyboard().leave_window (0, this);
pop_splash ();
Dialog::on_unmap (); Dialog::on_unmap ();
} }
@ -131,11 +132,9 @@ ArdourDialog::on_show ()
if (Splash::exists()) { if (Splash::exists()) {
Splash* spl = Splash::instance(); Splash* spl = Splash::instance();
if (spl->is_visible()) {
spl->pop_back_for (*this); spl->pop_back_for (*this);
_splash_pushed = true; _splash_pushed = true;
} }
}
_sensitive = true; _sensitive = true;
} }

View file

@ -165,6 +165,9 @@ Splash::pop_front_for (Gtk::Window& win)
#else #else
_window_stack.erase (&win); _window_stack.erase (&win);
#endif #endif
if (_window_stack.empty ()) {
display ();
}
} }
void void
@ -247,7 +250,7 @@ Splash::expose (GdkEventExpose* ev)
void void
Splash::boot_message (std::string msg) Splash::boot_message (std::string msg)
{ {
if (!is_visible()) { if (!is_visible() && _window_stack.empty ()) {
display (); display ();
} }
message (msg); message (msg);
@ -290,8 +293,6 @@ Splash::message (const string& msg)
str += Gtkmm2ext::markup_escape_text (msg); str += Gtkmm2ext::markup_escape_text (msg);
str += "</b>"; str += "</b>";
show ();
layout->set_markup (str); layout->set_markup (str);
Glib::RefPtr<Gdk::Window> win = darea.get_window(); Glib::RefPtr<Gdk::Window> win = darea.get_window();