aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorAndreas Färber <andreas.faerber@web.de>2011-10-30 23:19:54 +0100
committerAndreas Färber <andreas.faerber@web.de>2011-11-01 20:41:06 +0100
commit13766eb1e46452affd12f2b944730e136c6a2dda (patch)
treefff4fdc354819016d47e9e275cc100990357dbc7 /ui
parentdb529aabfac17201d3647384abf89fc7f272b493 (diff)
downloadqemu-13766eb1e46452affd12f2b944730e136c6a2dda.zip
qemu-13766eb1e46452affd12f2b944730e136c6a2dda.tar.gz
qemu-13766eb1e46452affd12f2b944730e136c6a2dda.tar.bz2
cocoa: Close sheet after image file selection
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 <juan@logician.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Diffstat (limited to 'ui')
-rw-r--r--ui/cocoa.m2
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);