From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu Developers <qemu-devel@nongnu.org>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v2] ui/console: Pass placeholder surface to displays
Date: Tue, 23 Feb 2021 13:43:26 +0900 [thread overview]
Message-ID: <CAMVc7JXTXngrnKF-u91S7JHUMVWrDGLEdupX4XN99dM1ZPJw-w@mail.gmail.com> (raw)
In-Reply-To: <20210222105100.idqhislns33etne7@sirius.home.kraxel.org>
2021年2月22日(月) 19:51 Gerd Hoffmann <kraxel@redhat.com>:
>
> 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.
The other surfaces created by qemu_create_message_surface() are not
considered as "placeholder" here, and have contents to be displayed.
Since no emulated devices give NULL to dpy_gfx_replace_surface for the
primary connection, it will never get the "placeholder", and its
window will be always shown.
Regards,
Akihiko Odaki
>
> take care,
> Gerd
>
next prev parent reply other threads:[~2021-02-23 4:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 10:17 [PATCH] ui/console: Assert graphic console surface is not NULL Akihiko Odaki
2021-02-19 14:48 ` Gerd Hoffmann
2021-02-20 11:38 ` [PATCH v2] ui/console: Pass placeholder surface to displays Akihiko Odaki
2021-02-22 10:51 ` Gerd Hoffmann
2021-02-23 4:43 ` Akihiko Odaki [this message]
2021-02-24 11:06 ` Gerd Hoffmann
2021-02-25 1:36 ` [PATCH v3 1/3] ui/console: Add placeholder flag to message surface Akihiko Odaki
2021-02-25 1:36 ` [PATCH v3 2/3] ui/console: Pass placeholder surface to displays Akihiko Odaki
2021-02-25 9:06 ` Gerd Hoffmann
2021-02-25 1:36 ` [PATCH v3 3/3] virtio-gpu: Do not distinguish the primary console Akihiko Odaki
2021-02-25 9:10 ` Gerd Hoffmann
2021-02-25 9:45 ` Akihiko Odaki
2021-02-25 11:19 ` Gerd Hoffmann
2021-02-25 9:01 ` [PATCH v3 1/3] ui/console: Add placeholder flag to message surface Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMVc7JXTXngrnKF-u91S7JHUMVWrDGLEdupX4XN99dM1ZPJw-w@mail.gmail.com \
--to=akihiko.odaki@gmail.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).