From patchwork Sat Jul 30 09:39:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 107485 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BD951B6EE8 for ; Sat, 30 Jul 2011 19:39:45 +1000 (EST) Received: from localhost ([::1]:42195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qn61H-0006C9-00 for incoming@patchwork.ozlabs.org; Sat, 30 Jul 2011 05:39:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:58350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qn613-00061u-8U for qemu-devel@nongnu.org; Sat, 30 Jul 2011 05:39:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qn610-0005cd-9B for qemu-devel@nongnu.org; Sat, 30 Jul 2011 05:39:29 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:58729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qn610-0005cA-2c for qemu-devel@nongnu.org; Sat, 30 Jul 2011 05:39:26 -0400 Received: from smtp03.web.de ( [172.20.0.65]) by fmmailgate01.web.de (Postfix) with ESMTP id 793CB19476D44; Sat, 30 Jul 2011 11:39:25 +0200 (CEST) Received: from [92.75.128.27] (helo=localhost.localdomain) by smtp03.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1Qn60z-0001Sl-02; Sat, 30 Jul 2011 11:39:25 +0200 From: Jan Kiszka To: Anthony Liguori , qemu-devel Date: Sat, 30 Jul 2011 11:39:13 +0200 Message-Id: <55ed6997971adb3c65061f66b8b66113d549a91e.1312018756.git.jan.kiszka@web.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX1/6F5ZVxEaxAucvomVD6+Nls7CXHmz3PgghmqUR NB41vImFtldchvDQw4O+cGopZzn9lgOah+PO5puXS5fBje3Vo0 Wp/YzLKew= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.221 Subject: [Qemu-devel] [PATCH 10/15] sdl: Never release input while in full screen mode 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 From: Jan Kiszka It's confusing to suddenly find two mice in full screen mode when switching consoles or accidentally hitting the grab hot keys. Signed-off-by: Jan Kiszka --- ui/sdl.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 27465b2..662ffef 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -626,9 +626,10 @@ static void sdl_refresh(DisplayState *ds) reset_keys(); console_select(keycode - 0x02); if (!is_graphic_console()) { - /* display grab if going to a text console */ - if (gui_grab) + /* release grab if going to a text console */ + if (gui_grab && !gui_fullscreen) { sdl_grab_end(); + } } gui_keysym = 1; break; @@ -694,7 +695,7 @@ static void sdl_refresh(DisplayState *ds) SDL_GetAppState() & SDL_APPACTIVE) { sdl_grab_start(); } - } else { + } else if (!gui_fullscreen) { sdl_grab_end(); } /* SDL does not send back all the