[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] ui/console: Pass placeholder surface to displays
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH v2] ui/console: Pass placeholder surface to displays |
Date: |
Mon, 22 Feb 2021 11:51:00 +0100 |
Hi,
> #define QEMU_ALLOCATED_FLAG 0x01
> +#define QEMU_PLACEHOLDER_FLAG 0x02
> +static inline int is_placeholder(DisplaySurface *surface)
> +{
> + return surface->flags & QEMU_PLACEHOLDER_FLAG;
> +}
Interesting idea. That approach makes sense too.
> + if (!placeholder) {
> + placeholder = qemu_create_message_surface(640, 480,
> placeholder_msg);
> + placeholder->flags |= QEMU_PLACEHOLDER_FLAG;
I think we should set the placeholder flag in
qemu_create_message_surface() because every surface created with that
function is some kind if placeholder.
Also when replacing an existing surface we should make the placeholder
the same size, to avoid pointless ui window resizes.
> - if (!new_surface) {
> + if (is_placeholder(new_surface)) {
We should check whenever this is the primary or a secondary window here
and only destroy secondary windows. qemu hiding all windows but
continuing to run has great potential for user confusion ...
> - if (!new_surface) {
> + if (is_placeholder(new_surface)) {
Same here.
take care,
Gerd
- [PATCH] ui/console: Assert graphic console surface is not NULL, Akihiko Odaki, 2021/02/19
- Re: [PATCH] ui/console: Assert graphic console surface is not NULL, Gerd Hoffmann, 2021/02/19
- [PATCH v2] ui/console: Pass placeholder surface to displays, Akihiko Odaki, 2021/02/20
- Re: [PATCH v2] ui/console: Pass placeholder surface to displays,
Gerd Hoffmann <=
- Re: [PATCH v2] ui/console: Pass placeholder surface to displays, Akihiko Odaki, 2021/02/22
- Re: [PATCH v2] ui/console: Pass placeholder surface to displays, Gerd Hoffmann, 2021/02/24
- [PATCH v3 1/3] ui/console: Add placeholder flag to message surface, Akihiko Odaki, 2021/02/24
- [PATCH v3 2/3] ui/console: Pass placeholder surface to displays, Akihiko Odaki, 2021/02/24
- Re: [PATCH v3 2/3] ui/console: Pass placeholder surface to displays, Gerd Hoffmann, 2021/02/25
- [PATCH v3 3/3] virtio-gpu: Do not distinguish the primary console, Akihiko Odaki, 2021/02/24
- Re: [PATCH v3 3/3] virtio-gpu: Do not distinguish the primary console, Gerd Hoffmann, 2021/02/25
- Re: [PATCH v3 3/3] virtio-gpu: Do not distinguish the primary console, Akihiko Odaki, 2021/02/25
- Re: [PATCH v3 3/3] virtio-gpu: Do not distinguish the primary console, Gerd Hoffmann, 2021/02/25
- Re: [PATCH v3 1/3] ui/console: Add placeholder flag to message surface, Gerd Hoffmann, 2021/02/25