From patchwork Mon Oct 31 19:18:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 122926 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 4B59DB6F87 for ; Tue, 1 Nov 2011 06:19:53 +1100 (EST) Received: from localhost ([::1]:55322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKxOg-0007B4-Mj for incoming@patchwork.ozlabs.org; Mon, 31 Oct 2011 15:19:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKxOZ-000780-2i for qemu-devel@nongnu.org; Mon, 31 Oct 2011 15:19:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKxOX-0004MS-TD for qemu-devel@nongnu.org; Mon, 31 Oct 2011 15:19:43 -0400 Received: from fmmailgate07.web.de ([217.72.192.248]:40068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKxOX-0004MM-IW for qemu-devel@nongnu.org; Mon, 31 Oct 2011 15:19:41 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate07.web.de (Postfix) with ESMTP id 688BDAB7D82 for ; Mon, 31 Oct 2011 20:19:40 +0100 (CET) Received: from localhost.localdomain ([91.81.229.165]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0Lh6fv-1QfnGj026x-00oaXe; Mon, 31 Oct 2011 20:19:40 +0100 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Mon, 31 Oct 2011 20:18:02 +0100 Message-Id: <1320088682-12958-5-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.7.0.3 In-Reply-To: <1320088682-12958-1-git-send-email-andreas.faerber@web.de> References: <1320088682-12958-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 X-Provags-ID: V02:K0:ri55hir09E61/ilSw99aJ0x/R/T/G1Pm7XezrhpsB8V lkEuFwzBtVjJN2tsGHvCUuQWjDeLQaCeTZBdZX/E0PP3TZC4xQ XglCJfPRn3z4awqpriv6w6V96vIcTZNE1spbgsDTVXj/E+9BUk rVxYBMBN1jAEs5cpFllj5JTzC0pP7SbaUSNiHDdvtjhBLsug2l pH6bbOE9Nj4sawLX8drFw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.248 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Juan Pineda Subject: [Qemu-devel] [PATCH v2 4/4] cocoa: Close sheet after image file selection 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 If no disk image is specified, the Cocoa frontend displays a modal sheet to let the user select an image file to boot from. This sheet is never closed and it permanently obscures the emulator window. Close it after obtaining the file name in case the user did select a file. Otherwise we exit immediately, so no need to close then. Signed-off-by: Juan Pineda Signed-off-by: Andreas Färber --- ui/cocoa.m | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index d9e4e3d..0711205 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -811,6 +811,8 @@ QemuCocoaView *cocoaView; char **argv = (char**)malloc( sizeof(char*)*3 ); + [sheet close]; + asprintf(&argv[0], "%s", bin); asprintf(&argv[1], "-hda"); asprintf(&argv[2], "%s", img);