qemu-e2k/ui
Akihiko Odaki c821a58ee7 ui/console: Pass placeholder surface to displays
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 message, "Display output is not active."

Fortunately, only virtio-gpu and virtio-gpu-3d assign NULL so
we can study them to figure out the desired behavior. They assign
NULL *except* for the primary display when the device is realized,
reset, or its scanout is disabled. This effectively destroys
windows for the (uninitialized) secondary displays.

To implement the consistent behavior of display device
realization/reset, this change embeds it to the operation
switching the surface. When NULL was given as a new surface when
switching, ui/console will instead passes a placeholder down
to each display listeners.

sdl destroys the window for a secondary console if its surface is a
placeholder. The other displays simply shows the placeholder.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210225101316.83940-2-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-03-04 09:35:36 +01:00
..
icons
keycodemapdb@6119e6e19a ui: update keycodemapdb submodule commit 2021-01-29 17:07:53 +00:00
shader
cocoa.m ui/cocoa: Replace fprintf with error_report 2021-03-04 09:35:36 +01:00
console-gl.c
console.c ui/console: Pass placeholder surface to displays 2021-03-04 09:35:36 +01:00
curses_keys.h
curses.c
cursor_hidden.xpm
cursor_left_ptr.xpm
cursor.c
egl-context.c ui: remove gl_ctx_get_current 2021-02-04 15:58:54 +01:00
egl-headless.c ui: remove gl_ctx_get_current 2021-02-04 15:58:54 +01:00
egl-helpers.c configure: Improve OpenGL dependency detections 2021-03-04 09:35:30 +01:00
gtk-egl.c configure: Improve OpenGL dependency detections 2021-03-04 09:35:30 +01:00
gtk-gl-area.c configure: Improve OpenGL dependency detections 2021-03-04 09:35:30 +01:00
gtk.c ui/console: Pass placeholder surface to displays 2021-03-04 09:35:36 +01:00
input-barrier.c
input-barrier.h
input-keymap.c
input-legacy.c
input-linux.c
input.c qapi: Use QAPI_LIST_PREPEND() where possible 2020-12-19 10:20:14 +01:00
kbd-state.c
keymaps.c vl: extract softmmu/datadir.c 2020-12-10 12:15:18 -05:00
keymaps.h
meson.build configure: Improve OpenGL dependency detections 2021-03-04 09:35:30 +01:00
qemu-pixman.c
qemu-x509.h
qemu.desktop
sdl2-2d.c ui/console: Pass placeholder surface to displays 2021-03-04 09:35:36 +01:00
sdl2-gl.c ui/console: Pass placeholder surface to displays 2021-03-04 09:35:36 +01:00
sdl2-input.c
sdl2.c ui: remove gl_ctx_get_current 2021-02-04 15:58:54 +01:00
shader.c
spice-app.c spice-app: avoid crash when core spice module doesn't loaded 2021-02-19 15:00:13 +01:00
spice-core.c spice: delay starting until display are initialized 2021-02-04 14:32:40 +01:00
spice-display.c ui/console: Pass placeholder surface to displays 2021-03-04 09:35:36 +01:00
spice-input.c
spice-module.c
trace-events
trace.h
vgafont.h
vnc_keysym.h
vnc-auth-sasl.c
vnc-auth-sasl.h
vnc-auth-vencrypt.c
vnc-auth-vencrypt.h
vnc-enc-hextile-template.h
vnc-enc-hextile.c
vnc-enc-tight.c
vnc-enc-tight.h
vnc-enc-zlib.c
vnc-enc-zrle.c
vnc-enc-zrle.c.inc
vnc-enc-zrle.h
vnc-enc-zywrle-template.c
vnc-enc-zywrle.h
vnc-jobs.c
vnc-jobs.h
vnc-palette.c
vnc-palette.h
vnc-stubs.c vnc: support "-vnc help" 2021-01-23 15:55:07 -05:00
vnc-ws.c
vnc-ws.h
vnc.c ui/console: Pass placeholder surface to displays 2021-03-04 09:35:36 +01:00
vnc.h vnc: add support for extended desktop resize 2021-01-15 11:22:43 +01:00
win32-kbd-hook.c
x_keymap.c
x_keymap.h