All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carwyn Ellis <carwynellis@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, peter.maydell@linaro.org,
	Carwyn Ellis <carwynellis@gmail.com>
Subject: [PATCH 0/1] ui/cocoa: Add option to disable left command and hide cursor on click
Date: Fri, 31 Dec 2021 17:42:09 +0000	[thread overview]
Message-ID: <20211231174210.82446-1-carwynellis@gmail.com> (raw)

Apologies for all the spam on what should be a simple change. Still
getting the hang of all of this. :/

Please disregard my earlier submissions. After further testing I
realised that the calls to cursor hide/unhide weren't balanced which
broke the hide/unhide behaviour. I've added an additional static flag
to track the cursor state so the cursor state is only updated where this
would change the existing cursor state, ensuring the calls are now
balanced.

Having made the switch to an M1 Mac I needed to switch from VMware back
to QEMU in order to run some intel guests.

This patch addresses a couple of niggles with the cocoa UI, namely:

 - Using command-tab to switch between the guest OS and MacOS sends the
   command keypress to the guest which can be annoying e.g. on a
   windows guest this may trigger the start menu

 - Switching between the guest and MacOS sometimes leaves the MacOS
   mouse cursor visible with no way to hide it without switching
   windows again

To address these issues I've made the following changes

 - Added a new cocoa display option left-command-key which can be used
   to disable the left command key in the guest. Default is on.

 - Added a call to hideCursor on left and right mouse clicks so if the
   cursor is visible after switching back to the guest a mouse click
   will hide the cursor again.

 - Also updated the command line docs to reference the show-cursor
   option which is also respected by the cocoa UI code.

Carwyn Ellis (1):
  ui/cocoa: Add option to disable left command and hide cursor on click

 qapi/ui.json    | 17 +++++++++++++++++
 qemu-options.hx | 12 ++++++++++++
 ui/cocoa.m      | 33 +++++++++++++++++++++++++--------
 3 files changed, 54 insertions(+), 8 deletions(-)

-- 
2.34.1



             reply	other threads:[~2021-12-31 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31 17:42 Carwyn Ellis [this message]
2021-12-31 17:42 ` [PATCH 1/1] ui/cocoa: Add option to disable left command and hide cursor on click Carwyn Ellis
2021-12-31 17:49   ` Alexander Orzechowski
2021-12-31 17:52     ` Carwyn Ellis
2021-12-31 17:56   ` Alexander Orzechowski
2021-12-31 17:57     ` Carwyn Ellis
  -- strict thread matches above, loose matches on Subject: below --
2021-12-31 11:30 [PATCH 0/1] " 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=20211231174210.82446-1-carwynellis@gmail.com \
    --to=carwynellis@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.