qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ui/cocoa: Add option to disable left command and hide cursor on click
@ 2022-01-02 17:41 Carwyn Ellis
  2022-01-02 17:41 ` [PATCH 1/2] ui/cocoa: add option to disable left-command forwarding to guest Carwyn Ellis
  2022-01-02 17:41 ` [PATCH 2/2] ui/cocoa: release mouse when user switches away from QEMU window Carwyn Ellis
  0 siblings, 2 replies; 8+ messages in thread
From: Carwyn Ellis @ 2022-01-02 17:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, peter.maydell, Carwyn Ellis

Supersedes earlier submissions and splits the patch into two separate
patches covering

  - addition of left-command-key option to disable forwarding this key
    to the guest
  - fix for persistent mouse cursor when switching from and back to the
    QEMU window

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

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 ungrabMouse in the applicationWillResignActive method
   which frees the mouse and unhides the cursor when switching away from
   the QEMU window. When switching back the user must left-click in
   to grab the mouse and hide the cursor again. After testing several
   different approaches this was the only way I could find to reliably
   hide the cursor every time the user returns to QEMU after switching
   to another app on the host machine.

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

Carwyn Ellis (2):
  ui/cocoa: add option to disable left-command forwarding to guest
  ui/cocoa: release mouse when user switches away from QEMU window

 qapi/ui.json    | 17 +++++++++++++++++
 qemu-options.hx | 12 ++++++++++++
 ui/cocoa.m      | 10 +++++++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-11 12:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-02 17:41 [PATCH 0/2] ui/cocoa: Add option to disable left command and hide cursor on click Carwyn Ellis
2022-01-02 17:41 ` [PATCH 1/2] ui/cocoa: add option to disable left-command forwarding to guest Carwyn Ellis
2022-02-18 18:33   ` Akihiko Odaki
2022-02-18 18:55   ` Peter Maydell
2022-02-18 20:21     ` Philippe Mathieu-Daudé via
2022-03-11 12:46       ` Markus Armbruster
2022-01-02 17:41 ` [PATCH 2/2] ui/cocoa: release mouse when user switches away from QEMU window Carwyn Ellis
2022-02-18 18:33   ` Akihiko Odaki

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).