]> git.ipfire.org Git - thirdparty/qemu.git/commit
ui/gtk-gl-area: Render guest content with padding in fixed-scale mode
authorWeifeng Liu <weifeng.liu.z@gmail.com>
Sun, 11 May 2025 07:33:18 +0000 (15:33 +0800)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 24 May 2025 15:04:00 +0000 (17:04 +0200)
commitfdc09b028fde9d2ec70418735f354b51c8295d0f
tree59103a3b4b297e2c009c8f8a206174a4fcf2071c
parenta1b28f71f7ff0fcafbe0672b788e8e57ee4fe8f6
ui/gtk-gl-area: Render guest content with padding in fixed-scale mode

In fixed-scale mode (zoom-to-fit=false), we expect that scale should not
change, meaning that if window size is larger than guest surface,
padding is supposed to be added to preserve the scale. However, in
OpenGL mode (gl=on), guest surface is always painted to the whole canvas
without any padding. This change tries to fix this bug by adding
appropriate padding when drawing surfaces.

Signed-off-by: Weifeng Liu <weifeng.liu.z@gmail.com>
Message-ID: <20250511073337.876650-9-weifeng.liu.z@gmail.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
ui/gtk-gl-area.c