From 351f1bf6fc9f02cd2ef341f853f7bb55d05974ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 30 Oct 2011 18:08:01 +0100 Subject: MAINTAINERS: Add Cocoa maintainer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Degrade cocoa.m from Maintained to Odd Fixes. Signed-off-by: Andreas Färber Cc: Anthony Liguori --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bccdd4f78f..7ee301e787 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -451,6 +451,11 @@ M: Anthony Liguori S: Maintained F: ui/ +Cocoa graphics +M: Andreas Färber +S: Odd Fixes +F: ui/cocoa.m + Main loop M: Anthony Liguori S: Supported -- cgit v1.2.1 From db529aabfac17201d3647384abf89fc7f272b493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 31 Oct 2011 19:14:56 +0100 Subject: vl.c: Guard against GThread double-initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GThread-ERROR **: GThread system may only be initialized once. aborting... Making the g_thread_init() call in vl.c conditional resolves an abort on Mac OS X, where coroutine-gthread.c seems to call it before vl.c. Reported-by: Juan Pineda Signed-off-by: Andreas Färber Cc: Daniel P. Berrange --- vl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index b56e0cb378..624da0fd3c 100644 --- a/vl.c +++ b/vl.c @@ -2185,7 +2185,9 @@ int main(int argc, char **argv, char **envp) error_set_progname(argv[0]); g_mem_set_vtable(&mem_trace); - g_thread_init(NULL); + if (!g_thread_supported()) { + g_thread_init(NULL); + } runstate_init(); -- cgit v1.2.1 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: 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 d9e4e3dcaa..0711205cbe 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); -- cgit v1.2.1