diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-11-11 12:02:50 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-12-17 12:43:55 +0100 |
commit | 44f017d03e72484d47a2aefcbf452af0a9915fbc (patch) | |
tree | 79685be1b132be5b5fca24192f0a9a9cc3e80d35 /ui | |
parent | 8fc1a3f58f180089284c7d5c8e67b584930d19fe (diff) | |
download | qemu-44f017d03e72484d47a2aefcbf452af0a9915fbc.zip qemu-44f017d03e72484d47a2aefcbf452af0a9915fbc.tar.gz qemu-44f017d03e72484d47a2aefcbf452af0a9915fbc.tar.bz2 |
sdl2: turn on keyboard grabs
Makes quite some keys actually go to the guest instead of
being captured by the host window manager.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sdl2.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -189,11 +189,11 @@ static void sdl_update_caption(struct sdl2_console *scon) status = " [Stopped]"; } else if (gui_grab) { if (alt_grab) { - status = " - Press Ctrl-Alt-Shift to exit mouse grab"; + status = " - Press Ctrl-Alt-Shift to exit grab"; } else if (ctrl_grab) { - status = " - Press Right-Ctrl to exit mouse grab"; + status = " - Press Right-Ctrl to exit grab"; } else { - status = " - Press Ctrl-Alt to exit mouse grab"; + status = " - Press Ctrl-Alt to exit grab"; } } @@ -785,6 +785,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) SDL_GetError()); exit(1); } + SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1"); for (i = 0;; i++) { QemuConsole *con = qemu_console_lookup_by_index(i); |