fix display of splash screen (at least on X11)
git-svn-id: svn://localhost/ardour2/branches/3.0@14134 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
fbf7e4385b
commit
4830bd633f
@ -83,6 +83,7 @@ Splash::Splash ()
|
|||||||
the_splash = this;
|
the_splash = this;
|
||||||
|
|
||||||
expose_done = false;
|
expose_done = false;
|
||||||
|
expose_is_the_one = false;
|
||||||
|
|
||||||
ARDOUR::BootMessage.connect (msg_connection, invalidator (*this), boost::bind (&Splash::boot_message, this, _1), gui_context());
|
ARDOUR::BootMessage.connect (msg_connection, invalidator (*this), boost::bind (&Splash::boot_message, this, _1), gui_context());
|
||||||
}
|
}
|
||||||
@ -151,8 +152,10 @@ Splash::expose (GdkEventExpose* ev)
|
|||||||
/* this must execute AFTER the GDK idle update mechanism
|
/* this must execute AFTER the GDK idle update mechanism
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Glib::signal_idle().connect (sigc::mem_fun (this, &Splash::idle_after_expose),
|
if (expose_is_the_one) {
|
||||||
GDK_PRIORITY_REDRAW+2);
|
Glib::signal_idle().connect (sigc::mem_fun (this, &Splash::idle_after_expose),
|
||||||
|
GDK_PRIORITY_REDRAW+2);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -177,6 +180,7 @@ Splash::display ()
|
|||||||
|
|
||||||
if (!was_mapped) {
|
if (!was_mapped) {
|
||||||
expose_done = false;
|
expose_done = false;
|
||||||
|
expose_is_the_one = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
pop_front ();
|
pop_front ();
|
||||||
@ -186,6 +190,7 @@ Splash::display ()
|
|||||||
while (!expose_done) {
|
while (!expose_done) {
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
}
|
}
|
||||||
|
gdk_display_flush (gdk_display_get_default());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,5 +216,13 @@ Splash::message (const string& msg)
|
|||||||
while (!expose_done) {
|
while (!expose_done) {
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
}
|
}
|
||||||
|
gdk_display_flush (gdk_display_get_default());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Splash::on_map_event (GdkEventAny* ev)
|
||||||
|
{
|
||||||
|
expose_is_the_one = true;
|
||||||
|
return Window::on_map_event (ev);
|
||||||
|
}
|
||||||
|
@ -45,7 +45,7 @@ class Splash : public Gtk::Window
|
|||||||
bool expose (GdkEventExpose*);
|
bool expose (GdkEventExpose*);
|
||||||
bool on_button_release_event (GdkEventButton*);
|
bool on_button_release_event (GdkEventButton*);
|
||||||
void on_realize ();
|
void on_realize ();
|
||||||
|
bool on_map_event (GdkEventAny*);
|
||||||
void message (const std::string& msg);
|
void message (const std::string& msg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -59,6 +59,7 @@ class Splash : public Gtk::Window
|
|||||||
PBD::ScopedConnection msg_connection;
|
PBD::ScopedConnection msg_connection;
|
||||||
|
|
||||||
bool expose_done;
|
bool expose_done;
|
||||||
|
bool expose_is_the_one;
|
||||||
bool idle_after_expose ();
|
bool idle_after_expose ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user