From patchwork Fri Dec 19 09:16:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 422833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D5068140082 for ; Fri, 19 Dec 2014 20:23:28 +1100 (AEDT) Received: from localhost ([::1]:57517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tmR-0002bD-2V for incoming@patchwork.ozlabs.org; Fri, 19 Dec 2014 04:23:27 -0500 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 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBJ9HApR019424 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Dec 2014 04:17:11 -0500 Received: from nilsson.home.kraxel.org (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBJ9HAVH028941; Fri, 19 Dec 2014 04:17:10 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 28F958169E; Fri, 19 Dec 2014 10:17:09 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Anthony Liguori Subject: [Qemu-devel] [PULL 04/12] sdl2: turn on keyboard grabs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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);