Re: [PATCH v2] ui/console: Pass placeholder surface to displays

2021-02-24 Thread Gerd Hoffmann
Hi, > > > -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. Which ones? Pretty much any qemu_create_message_su

Re: [PATCH v2] ui/console: Pass placeholder surface to displays

2021-02-22 Thread Akihiko Odaki
2021年2月22日(月) 19:51 Gerd Hoffmann : > > 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 appr

Re: [PATCH v2] ui/console: Pass placeholder surface to displays

2021-02-22 Thread Gerd Hoffmann
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) { > +

[PATCH v2] ui/console: Pass placeholder surface to displays

2021-02-20 Thread Akihiko Odaki
ui/console used to accept NULL as graphic console surface, but its semantics was inconsistent among displays: - cocoa and gtk-egl perform NULL dereference. - egl-headless, spice and spice-egl do nothing. - gtk releases underlying resources. - sdl2-2d and sdl2-gl destroys the window. - vnc shows a m