make sure MainWindow is not shown before Renderer is ready
MainWindow
is set to be shown centered on screen, but if
we show it before the contained Renderer is ready (i.e.
when it has gotten its final width and height) then
that new empty window will be centered for a moment but
just after that, the window gets resized to make room for
the contained Renderer
final dimensions.
This window enlargement ruins the centering, because
the window x,y
origin is still the same.
The Evince Renderer
was not suffering this bug because
it subclasses GtkScrolledWindow
which probably has a
different handling for that. But the Image Renderer
which
just subclasses GtkDrawingArea
was suffering this bug.
The fix is just to make sure we don't show the MainWindow
until the Renderer has signaled it's ready (i.e. it has
its definitive width and height).
Although we want to have MainWindow
not visible initially,
we still had to call show_all()
on it briefly so that
Renderers which use Sushi.MediaBin
(like gst.js and audio.js)
don't show an extra window, that was probably the original
motivation for showing the window before ready
signal.
Closes #93 (closed)