aboutsummaryrefslogtreecommitdiff
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gustavo@noronha.dev.br>2022-03-06 21:11:18 +0900
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-03-15 13:36:33 +0100
commitf844cdb997144a3fd83d7d18e32365fc6a1a8a1f (patch)
tree92fbd9377d6348f01e7268bad3c011f985eddec0 /qemu-options.hx
parent69221df8cde644ce75053986b712c40a2a83966a (diff)
ui/cocoa: capture all keys and combos when mouse is grabbed
Applications such as Gnome may use Alt-Tab and Super-Tab for different purposes, some use Ctrl-arrows so we want to allow qemu to handle everything when it captures the mouse/keyboard. However, Mac OS handles some combos like Command-Tab and Ctrl-arrows at an earlier part of the event handling chain, not letting qemu see it. We add a global Event Tap that allows qemu to see all events when the mouse is grabbed. Note that this requires additional permissions. See: https://developer.apple.com/documentation/coregraphics/1454426-cgeventtapcreate?language=objc#discussion https://support.apple.com/en-in/guide/mac-help/mh32356/mac Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gustavo Noronha Silva <gustavo@noronha.dev.br> Message-Id: <20210713213200.2547-2-gustavo@noronha.dev.br> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220306121119.45631-2-akihiko.odaki@gmail.com> Reviewed-by: Will Cohen <wwcohen@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx3
1 files changed, 3 insertions, 0 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index f464b2fe27..4395378bb8 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1916,6 +1916,9 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
#if defined(CONFIG_CURSES)
"-display curses[,charset=<encoding>]\n"
#endif
+#if defined(CONFIG_COCOA)
+ "-display cocoa[,full_grab=on|off]\n"
+#endif
#if defined(CONFIG_OPENGL)
"-display egl-headless[,rendernode=<file>]\n"
#endif