> +static void dpy_gfx_switch(DisplayChangeListener *dcl, DisplaySurface > *surface)
int width, int height; > + static DisplaySurface *placeholder; > + static const char placeholder_msg[] = "Display output is not active."; > + DisplaySurface *broadcast; > + > + if (!dcl->ops->dpy_gfx_switch) { > + return; > + } > + > + if (surface) { > + broadcast = surface; > + } else { > + if (!placeholder) { > + placeholder = qemu_create_placeholder_surface(640, 480, > placeholder_msg); > + } Just create a new one unconditionally. > @@ -1685,9 +1704,7 @@ void dpy_gfx_replace_surface(QemuConsole *con, > if (con != (dcl->con ? dcl->con : active_console)) { > continue; > } > - if (dcl->ops->dpy_gfx_switch) { > - dcl->ops->dpy_gfx_switch(dcl, surface); > - } > + dpy_gfx_switch(dcl, surface); You can look at the old_surface here and pass the size to dpy_gfx_switch(), so the placeholder is created with the same size. take care, Gerd