From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tgc-0000T0-U4 for qemu-devel@nongnu.org; Fri, 19 Dec 2014 04:17:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1tgQ-00068l-02 for qemu-devel@nongnu.org; Fri, 19 Dec 2014 04:17:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tgP-00068P-Kp for qemu-devel@nongnu.org; Fri, 19 Dec 2014 04:17:13 -0500 From: Gerd Hoffmann Date: Fri, 19 Dec 2014 10:16:58 +0100 Message-Id: <1418980626-22747-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1418980626-22747-1-git-send-email-kraxel@redhat.com> References: <1418980626-22747-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 04/12] 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 Reviewed-by: Max Reitz --- 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