All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: gustavo@noronha.eti.br
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	qemu Developers <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>, Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH v4 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed
Date: Wed, 16 Jun 2021 23:13:04 +0900	[thread overview]
Message-ID: <CAMVc7JVUabQvgxR_eVddvc0rtMf8RurgphaQnbpeYsOJF0P+bw@mail.gmail.com> (raw)
In-Reply-To: <20210511185538.29344-2-gustavo@noronha.eti.br>

2021年5月12日(水) 3:56 <gustavo@noronha.eti.br>:
> @@ -1877,11 +1934,17 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
>      qemu_sem_wait(&app_started_sem);
>      COCOA_DEBUG("cocoa_display_init: app start completed\n");
>
> +    QemuCocoaAppController* controller = (QemuCocoaAppController *)[NSApplication sharedApplication];
>      /* if fullscreen mode is to be used */
>      if (opts->has_full_screen && opts->full_screen) {
>          dispatch_async(dispatch_get_main_queue(), ^{
>              [NSApp activateIgnoringOtherApps: YES];
> -            [(QemuCocoaAppController *)[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
> +            [[controller delegate] toggleFullScreen: nil];
> +        });
> +    }
> +    if (opts->u.cocoa.has_full_grab && opts->u.cocoa.full_grab) {
> +        dispatch_async(dispatch_get_main_queue(), ^{
> +            [[controller delegate] setFullGrab: nil];
>          });
>      }
>      if (opts->has_show_cursor && opts->show_cursor) {
> --
> 2.30.1 (Apple Git-130)
>

Hi,

I found a problem which I didn't notice when I reviewed this patch
before. [NSApplication sharedApplication] is casted to
QemuCocoaAppController *, but its type is QemuApplication. Perhaps it
should be:
QemuCocoaAppController* controller = (QemuCocoaAppController
*)[[NSApplication sharedApplication] delegate];
and the following [controller delegate] should be replaced with controller.

Regards,
Akihiko Odaki


  parent reply	other threads:[~2021-06-16 14:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 18:55 [PATCH v4 0/2] cocoa: keyboard quality of life gustavo
2021-05-11 18:55 ` [PATCH v4 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed gustavo
2021-05-18 10:14   ` 'Gerd Hoffmann '
2021-05-26 15:13     ` Gustavo Noronha Silva
2021-06-09 13:27       ` Gustavo Noronha Silva
2021-06-16 14:13   ` Akihiko Odaki [this message]
2021-05-11 18:55 ` [PATCH v4 2/2] ui/cocoa: add option to swap Option and Command gustavo
2021-05-12  3:06   ` Akihiko Odaki
2021-05-12 10:22     ` Gustavo Noronha Silva

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=CAMVc7JVUabQvgxR_eVddvc0rtMf8RurgphaQnbpeYsOJF0P+bw@mail.gmail.com \
    --to=akihiko.odaki@gmail.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=gustavo@noronha.eti.br \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.