From: Weifeng Liu <weifeng.liu.z@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>,
"Dongwon Kim" <dongwon.kim@intel.com>
Subject: Re: [PATCH 0/9] ui: Improve scale handling
Date: Fri, 30 May 2025 14:39:50 +0800 [thread overview]
Message-ID: <0790819eab97fbc5728f583b6ec90e338c2819e0.camel@gmail.com> (raw)
In-Reply-To: <19542757-ecc0-4eb5-b26c-4a06f7f800c3@tls.msk.ru>
Hi Michael,
On Thu, 2025-05-29 at 10:23 +0300, Michael Tokarev wrote:
> On 11.05.2025 10:33, Weifeng Liu wrote:
> > Hi all,
> >
> > Now we have quite a lot of display backends for different use
> > cases.
> > Even in the context of gtk, we have various implementations (e.g.,
> > gl=on
> > vs gl=off, X11 vs Wayland). However, behaviors to users are not
> > aligned
> > across the backends, especially in the part of scale handling. This
> > patch set attempts to improve scale handling.
> >
> > We have to deal with various coordinates due to the existence of
> > scaling
> > in different level. Firstly, in desktop level, we could have a
> > global
> > window scale factor. Secondly, users might set a zooming factor to
> > adjust the size of guest content in scan-out level. Consequently,
> > 1) the
> > buffer from guest, 2) the host window and 3) OpenGl drawing area
> > inside
> > the host window are in distinct coordinates. It's important to
> > define
> > these coordinates and scales unambiguously and use a consistent
> > naming
> > convention for variables representing different concepts. The first
> > patch in this set tries to achieve this goal by adding a document
> > in
> > gtk.c, and the next patch (PATCH 2) attempts to align the code with
> > the
> > document.
> >
> > PATCH 3 - 5 fix bugs in mouse position calculation due to not
> > handling
> > scale properly, for both gtk and sdl.
> >
> > PATCH 6 align scale update logic in gtk-egl with other
> > implementations.
> >
> > PATCH 7 fix an issue that gtk window might keep enlarging/shrinking
> > because
> > ui info propagating to guest not considering scale.
> >
> > PATCH 8 and 9 align fixed-scale mode behavior in gtk-gl-area and
> > gtk-egl with
> > other implementations by adding appropriate padding to the window
> > to preserve
> > the scale.
> ...
> > Weifeng Liu (9):
> > ui/gtk: Document scale and coordinate handling
> > ui/gtk: Use consistent naming for variables in different
> > coordinates
> > gtk/ui: Introduce helper gd_update_scale
> > ui/gtk: Update scales in fixed-scale mode when rendering GL area
> > ui/sdl: Consider scaling in mouse event handling
> > ui/gtk: Don't update scale in fixed scale mode in gtk-egl.c
> > ui/gtk: Consider scaling when propagating ui info
> > ui/gtk-gl-area: Render guest content with padding in fixed-scale
> > mode
> > ui/gtk-egl: Render guest content with padding in fixed-scale
> > mode
>
> Is there anything here which should be picked up for qemu-stable
> (current active branches: 7.2 and 10.0)?
>
I think the first five patches are good candidates for backporting to
the stable branches, as they only address bugs without altering
existing behavior. I was able to apply them cleanly to stable-10.0, but
porting them to 7.2 will require some additional effort. I'll send out
a new patch set once the backporting work is complete.
Best regards,
Weifeng
> Thanks,
>
> /mjt
next prev parent reply other threads:[~2025-05-30 6:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-11 7:33 [PATCH 0/9] ui: Improve scale handling Weifeng Liu
2025-05-11 7:33 ` [PATCH 1/9] ui/gtk: Document scale and coordinate handling Weifeng Liu
2025-05-12 11:46 ` Gerd Hoffmann
2025-05-14 2:50 ` Weifeng Liu
2025-05-14 11:50 ` BALATON Zoltan
2025-05-15 5:55 ` Weifeng Liu
2025-05-11 7:33 ` [PATCH 2/9] ui/gtk: Use consistent naming for variables in different coordinates Weifeng Liu
2025-05-11 7:33 ` [PATCH 3/9] gtk/ui: Introduce helper gd_update_scale Weifeng Liu
2025-05-13 1:26 ` Kim, Dongwon
2025-05-13 2:08 ` Weifeng Liu
2025-05-13 20:01 ` Kim, Dongwon
2025-05-14 2:12 ` Weifeng Liu
2025-05-11 7:33 ` [PATCH 4/9] ui/gtk: Update scales in fixed-scale mode when rendering GL area Weifeng Liu
2025-05-11 7:33 ` [PATCH 5/9] ui/sdl: Consider scaling in mouse event handling Weifeng Liu
2025-05-11 7:33 ` [PATCH 6/9] ui/gtk: Don't update scale in fixed scale mode in gtk-egl.c Weifeng Liu
2025-05-11 7:33 ` [PATCH 7/9] ui/gtk: Consider scaling when propagating ui info Weifeng Liu
2025-05-11 7:33 ` [PATCH 8/9] ui/gtk-gl-area: Render guest content with padding in fixed-scale mode Weifeng Liu
2025-05-13 0:37 ` Kim, Dongwon
2025-05-13 2:28 ` Weifeng Liu
2025-05-13 9:52 ` BALATON Zoltan
2025-05-13 12:44 ` Weifeng Liu
2025-05-13 13:42 ` BALATON Zoltan
2025-05-11 7:33 ` [PATCH 9/9] ui/gtk-egl: " Weifeng Liu
2025-05-12 11:49 ` [PATCH 0/9] ui: Improve scale handling Gerd Hoffmann
2025-05-29 7:23 ` Michael Tokarev
2025-05-30 6:39 ` Weifeng Liu [this message]
2025-05-30 10:44 ` Michael Tokarev
2025-05-30 10:56 ` Michael Tokarev
2025-06-01 8:23 ` Weifeng Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0790819eab97fbc5728f583b6ec90e338c2819e0.camel@gmail.com \
--to=weifeng.liu.z@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=dmitry.osipenko@collabora.com \
--cc=dongwon.kim@intel.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=vivek.kasireddy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).