From: Carwyn Ellis <carwynellis@gmail.com>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: QEMU <qemu-devel@nongnu.org>,
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: Fri, 27 Oct 2023 16:31:26 +0100 [thread overview]
Message-ID: <B8E588D3-1A24-4F0C-BAEE-C02529D6EC58@gmail.com> (raw)
In-Reply-To: <e49bbe11-42e2-4251-843e-18b2d6bbca7c@daynix.com>
> On 27 Oct 2023, at 16:24, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> 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.
Ok.
>
> Also don't replace "Since: 7.0". It denotes the version that introduced the structure, not an individual member.
Ok, I’ll flip it back to 7.0.
>
>> ##
>> { '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.
Ahh of course.
Thanks again for getting back to me so quickly! :)
prev parent reply other threads:[~2023-10-27 15:31 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
2023-10-27 15:31 ` Carwyn Ellis [this message]
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=B8E588D3-1A24-4F0C-BAEE-C02529D6EC58@gmail.com \
--to=carwynellis@gmail.com \
--cc=akihiko.odaki@daynix.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).