From 13766eb1e46452affd12f2b944730e136c6a2dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 30 Oct 2011 23:19:54 +0100 Subject: [PATCH] cocoa: Close sheet after image file selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 file changed, 2 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index d9e4e3dca..0711205cb 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);