> - if (m->scanout_id == 0 && m->width == 0) { > + if (m->width == 0) { > s->ds = qemu_create_placeholder_surface(640, 480, > "Guest disabled > display."); > dpy_gfx_replace_surface(con, s->ds);
Just call dpy_gfx_replace_surface(con, NULL) here and let console.c create the placeholder? > for (i = 0; i < g->conf.max_outputs; i++) { > g->scanout[i].con = > graphic_console_init(DEVICE(g), i, &virtio_gpu_ops, g); > - if (i > 0) { > - dpy_gfx_replace_surface(g->scanout[i].con, NULL); > - } I think we should call dpy_gfx_replace_surface(..., NULL) unconditionally here instead of removing the call. > + /* primary head */ Comment can go away as we remove the special case for scanout == 0, > + ds = qemu_create_placeholder_surface(scanout->width ?: 640, > + scanout->height ?: 480, > + "Guest disabled display."); > dpy_gfx_replace_surface(scanout->con, ds); likewise "dpy_gfx_replace_surface(..., NULL);" take care, Gerd