Bug 1485616 - [Wayland] Wait with drawing until mozcontainer init is finished, r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D14070

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin Stransky 2018-12-11 10:09:13 +00:00
Родитель 6e403ff3ed
Коммит ba6e539858
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -156,7 +156,8 @@ void moz_container_init(MozContainer *container) {
container->subsurface = nullptr;
container->eglwindow = nullptr;
container->frame_callback_handler = nullptr;
container->ready_to_draw = false;
// We can draw to x11 window any time.
container->ready_to_draw = GDK_IS_X11_DISPLAY(gdk_display_get_default());
container->surface_needs_clear = true;
#endif
}

Просмотреть файл

@ -1869,6 +1869,9 @@ gboolean nsWindow::OnExposeEvent(cairo_t *cr) {
// Windows that are not visible will be painted after they become visible.
if (!mGdkWindow || mIsFullyObscured || !mHasMappedToplevel) return FALSE;
#ifdef MOZ_WAYLAND
if (mContainer && !mContainer->ready_to_draw) return FALSE;
#endif
nsIWidgetListener *listener = GetListener();
if (!listener) return FALSE;