fix problem with splash window on OS X: requesting a redraw of a hidden window doesn't result in an expose event being delivered.

The splash window was being hidden by default on OS X as soon as someone called Splash::pop_back_for(), because of window layering issues on OS X. But then
the next call to ::message() would not return because a recursive event loop was started that waits for the expose event, which never comes. So, (a) show the
window when ::message() is called AND (b) remove the recursive event loop because (b.1) we don't seem to need it (b.2) recursive event loops are generally evil.
This commit is contained in:
Paul Davis 2014-02-28 16:40:01 -05:00
parent 2067d52f10
commit 1a3b838dff

View file

@ -224,6 +224,8 @@ Splash::message (const string& msg)
str += Glib::Markup::escape_text (msg);
str += "</b>";
show ();
layout->set_markup (str);
Glib::RefPtr<Gdk::Window> win = darea.get_window();
@ -235,11 +237,6 @@ Splash::message (const string& msg)
} else {
darea.queue_draw ();
}
while (!expose_done) {
if(gtk_main_iteration ()) return; // quit was called
}
gdk_display_flush (gdk_display_get_default());
}
}