[PATCH 0/1] ui/cocoa: Add option to disable left command and hide cursor on click

Carwyn Ellis posted 1 patch 2 years, 4 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211231113059.84130-1-carwynellis@gmail.com
Maintainers: Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
qapi/ui.json    | 17 +++++++++++++++++
qemu-options.hx | 12 ++++++++++++
ui/cocoa.m      | 16 ++++++++++++++--
3 files changed, 43 insertions(+), 2 deletions(-)
[PATCH 0/1] ui/cocoa: Add option to disable left command and hide cursor on click
Posted by Carwyn Ellis 2 years, 4 months ago
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      | 16 ++++++++++++++--
 3 files changed, 43 insertions(+), 2 deletions(-)

-- 
2.34.1