From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz1Je-0000Bi-0a for qemu-devel@nongnu.org; Thu, 11 Dec 2014 05:49:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz1JW-0007QY-Fj for qemu-devel@nongnu.org; Thu, 11 Dec 2014 05:49:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz1JW-0007QJ-8B for qemu-devel@nongnu.org; Thu, 11 Dec 2014 05:49:42 -0500 From: Gerd Hoffmann Date: Thu, 11 Dec 2014 11:49:27 +0100 Message-Id: <1418294973-21790-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1418294973-21790-1-git-send-email-kraxel@redhat.com> References: <1418294973-21790-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 04/10] sdl2: turn on keyboard grabs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori Makes quite some keys actually go to the guest instead of being captured by the host window manager. Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index b8d592f..9b66017 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -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); -- 1.8.3.1