Without OpenGL and without shared memory, QEMU does not send a Scanout to a D-Bus display client when VGA text mode changes its size. The client gets only Updates for the rows of the new size, although ui/dbus-display1.xml says that Update is only called after a Scanout call.
Patch 1 sends a Scanout of the whole surface at the first update after a surface switch. With shared memory, dbus_scanout_map() already does the same with ScanoutMap. Patch 2 adds a test case for this to dbus-display-test. v1: https://lore.kernel.org/qemu-devel/[email protected]/ Changes since v1: - patch 1: clear the flag also when ScanoutMap is sent, and name ScanoutMap in the comment on the field (Marc-André Lureau) - Marc-André Lureau's Reviewed-by carried over to both patches: patch 1 changes only as he suggested, patch 2 is unchanged - rebased on current master Tests with v2, on master 4f4225874d: - dbus-display-test: with the series, all six test cases pass. One of them, console/map, waits for a ScanoutMap, so it runs the new line in dbus_scanout_map(). With patch 2 alone, the new test case text-resize fails ("Update" == "Scanout"). With patch 1 alone, the five other test cases pass. - I did not run the Windows NT 4.0 test from v1 again. v2 changes only the path with shared memory, and my D-Bus client does not implement org.qemu.Display1.Listener.Unix.Map, so for this client the code runs as in v1. - The Win32 variant of dbus_scanout_map() gets the same line. I have no Windows build here, so it is not compiled. checkpatch.pl is clean. Christian Quante (2): ui/dbus: send a Scanout before the first Update of a new surface tests/qtest/dbus-display-test: check the Scanout after a text resize tests/qtest/dbus-display-test.c | 162 +++++++++++++++++++++++++++++--- ui/dbus-listener.c | 10 +- 2 files changed, 157 insertions(+), 15 deletions(-) base-commit: 4f4225874d4d3747ec1142e935dbd314218992fa -- 2.53.0
