summaryrefslogtreecommitdiffstats
path: root/hw/display/virtio-gpu.c
diff options
context:
space:
mode:
authorAkihiko Odaki2021-02-25 11:13:14 +0100
committerGerd Hoffmann2021-03-04 09:35:36 +0100
commitb5a087b071b6d4752234d8c190cc7f22f44ec2e9 (patch)
tree5418155697d1a2fa255ec063a48573e4e788e627 /hw/display/virtio-gpu.c
parentui/cocoa: Replace fprintf with error_report (diff)
downloadqemu-b5a087b071b6d4752234d8c190cc7f22f44ec2e9.tar.gz
qemu-b5a087b071b6d4752234d8c190cc7f22f44ec2e9.tar.xz
qemu-b5a087b071b6d4752234d8c190cc7f22f44ec2e9.zip
ui/console: Add placeholder flag to message surface
The surfaces created with former qemu_create_message_surface did not display the content from the guest and always contained simple messages describing the reason. A display backend may want to hide the window showing such a surface. This change renames the function to qemu_create_placeholder_surface, and adds "placeholder" flag; the display can check the flag to decide to do anything special like hiding the window. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210225101316.83940-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
-rw-r--r--hw/display/virtio-gpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 2e4a9822b6..c1f17bec17 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -338,9 +338,9 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id)
if (scanout_id == 0) {
/* primary head */
- ds = qemu_create_message_surface(scanout->width ?: 640,
- scanout->height ?: 480,
- "Guest disabled display.");
+ ds = qemu_create_placeholder_surface(scanout->width ?: 640,
+ scanout->height ?: 480,
+ "Guest disabled display.");
}
dpy_gfx_replace_surface(scanout->con, ds);
scanout->resource_id = 0;