mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 21:06:03 +01:00
some hacks to try to get the splash to function reliably, particularly on OS X
git-svn-id: svn://localhost/ardour2/branches/3.0@13001 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6b06923a5d
commit
47eb7ed0cc
2 changed files with 48 additions and 4 deletions
|
|
@ -2830,9 +2830,34 @@ ARDOUR_UI::about_signal_response (int /*response*/)
|
|||
hide_about();
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::wakeup_from_splash_sleep (void* arg)
|
||||
{
|
||||
cerr << "idle after splash\n";
|
||||
((ARDOUR_UI*)arg)->_wakeup_from_splash_sleep ();
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::_wakeup_from_splash_sleep ()
|
||||
{
|
||||
splash_done_visible = true;
|
||||
cerr << "Set sdv to " << splash_done_visible << endl;
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::splash_visible (GdkEventAny*)
|
||||
{
|
||||
cerr << "Splash now mapped\n";
|
||||
g_idle_add ((gboolean (*)(void*))ARDOUR_UI::wakeup_from_splash_sleep, this);
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::show_splash ()
|
||||
{
|
||||
cerr << "Show splash!\n";
|
||||
|
||||
if (splash == 0) {
|
||||
try {
|
||||
splash = new Splash;
|
||||
|
|
@ -2841,11 +2866,24 @@ ARDOUR_UI::show_splash ()
|
|||
}
|
||||
}
|
||||
|
||||
splash->present ();
|
||||
bool was_mapped = splash->is_mapped ();
|
||||
|
||||
if (!was_mapped) {
|
||||
splash_expose = splash->signal_map_event().connect (sigc::mem_fun (this, &ARDOUR_UI::splash_visible), false);
|
||||
splash_done_visible = false;
|
||||
}
|
||||
|
||||
splash->pop_front ();
|
||||
splash->queue_draw ();
|
||||
splash->get_window()->process_updates (true);
|
||||
flush_pending ();
|
||||
splash->present ();
|
||||
|
||||
if (!was_mapped) {
|
||||
while (!splash_done_visible) {
|
||||
cerr << "nested iteration. sdv = " << splash_done_visible << endl;
|
||||
gtk_main_iteration ();
|
||||
}
|
||||
}
|
||||
|
||||
cerr << "show splash done\n";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -611,6 +611,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
About* about;
|
||||
Splash* splash;
|
||||
bool splash_done_visible;
|
||||
static bool wakeup_from_splash_sleep (void *);
|
||||
void _wakeup_from_splash_sleep ();
|
||||
bool splash_visible (GdkEventAny*);
|
||||
sigc::connection splash_expose;
|
||||
|
||||
void pop_back_splash (Gtk::Window&);
|
||||
|
||||
/* cleanup */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue