]> git.ipfire.org Git - thirdparty/qemu.git/commit
ui/console: Fix console resize with placeholder surface
authorTianlan Zhou <bobby825@126.com>
Wed, 7 Feb 2024 17:20:25 +0000 (01:20 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 20 Feb 2024 15:49:44 +0000 (18:49 +0300)
commit2e5c9d5462a24d54ed8df0fcbab12e3cc6b50f90
treefe9e5df095c18787b367051bf442eee6e78abf24
parent7ff0d4d184a83ac54b917c5af577e7a32e6a6f3e
ui/console: Fix console resize with placeholder surface

In `qemu_console_resize()`, the old surface of the console is keeped if the new
console size is the same as the old one. If the old surface is a placeholder,
and the new size of console is the same as the placeholder surface (640*480),
the surface won't be replace.
In this situation, the surface's `QEMU_PLACEHOLDER_FLAG` flag is still set, so
the console won't be displayed in SDL display mode.
This patch fixes this problem by forcing a new surface if the old one is a
placeholder.

Signed-off-by: Tianlan Zhou <bobby825@126.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20240207172024.8-1-bobby825@126.com>
(cherry picked from commit 95b08fee8f68d284a5028d37fd28be7a70c8e92b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
ui/console.c