qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: carwynellis@gmail.com, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, philmd@linaro.org, kraxel@redhat.com,
	marcandre.lureau@redhat.com
Subject: Re: [PATCH v2 1/1] ui/cocoa: add zoom-to-fit display option
Date: Sat, 28 Oct 2023 00:24:50 +0900	[thread overview]
Message-ID: <e49bbe11-42e2-4251-843e-18b2d6bbca7c@daynix.com> (raw)
In-Reply-To: <20231027150942.72357-2-carwynellis@gmail.com>

On 2023/10/28 0:09, carwynellis@gmail.com wrote:
> From: Carwyn Ellis <carwynellis@gmail.com>
> 
> Provides a display option, zoom-to-fit, that enables scaling of the
> display when full-screen mode is enabled.
> 
> Also ensures that the corresponding menu item is marked as enabled when
> the option is set to on.
> 
> Signed-off-by: Carwyn Ellis <carwynellis@gmail.com>
> ---
>   qapi/ui.json |  8 ++++++--
>   ui/cocoa.m   | 35 ++++++++++++++++++++---------------
>   2 files changed, 26 insertions(+), 17 deletions(-)
> 
> diff --git a/qapi/ui.json b/qapi/ui.json
> index 006616aa77..fd12791ff9 100644
> --- a/qapi/ui.json
> +++ b/qapi/ui.json
> @@ -1409,13 +1409,17 @@
>   #     codes match their position on non-Mac keyboards and you can use
>   #     Meta/Super and Alt where you expect them.  (default: off)
>   #
> -# Since: 7.0
> +# @zoom-to-fit: Scale display to fit when full-screen enabled.
> +#     Defaults to "off".
> +#
> +# Since: 8.2

I don't think this new option will affect only when full-screen enabled, 
but probably it will affect also in a windowed mode. Perhaps you can 
just copy the description for DisplayGTK except the statement regarding 
virtio-gpu.

Also don't replace "Since: 7.0". It denotes the version that introduced 
the structure, not an individual member.

>   ##
>   { 'struct': 'DisplayCocoa',
>     'data': {
>         '*left-command-key': 'bool',
>         '*full-grab': 'bool',
> -      '*swap-opt-cmd': 'bool'
> +      '*swap-opt-cmd': 'bool',
> +      '*zoom-to-fit': 'bool'
>     } }
>   
>   ##
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index d95276013c..903adb85a1 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -104,7 +104,7 @@ static void cocoa_switch(DisplayChangeListener *dcl,
>   static int left_command_key_enabled = 1;
>   static bool swap_opt_cmd;
>   
> -static bool stretch_video;
> +static bool stretch_video = false;

You don't need to assign false here. C initializes it as false by default.


  reply	other threads:[~2023-10-27 15:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 15:09 [PATCH v2 0/1] ui/cocoa: add zoom-to-fit display option carwynellis
2023-10-27 15:09 ` [PATCH v2 1/1] " carwynellis
2023-10-27 15:24   ` Akihiko Odaki [this message]
2023-10-27 15:31     ` Carwyn Ellis

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=e49bbe11-42e2-4251-843e-18b2d6bbca7c@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=carwynellis@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).