Skip to contentSkip to conversation

Cocoa fixes for 1.0

GIT PULL New Andreas Färber 2 participants 5 messages Nov 1, 2011

lore
Share & tools
lore
#0 lore raw

Hello Anthony,

Please pull these Cocoa-related patches for 1.0.

For our long-standing uint16 compilation issue we are still in need of a fully correct solution. Depending on what we come up with, we'll try to squeeze it in between RCs or defer it to next.

Regards,
Andreas

The following changes since commit 2ff6458116546ced7ce00cc39423ee30b1477e67:
Anthony Liguori (1):
Merge remote-tracking branch 'kraxel/usb.29' into staging

are available in the git repository at:

git://repo.or.cz/qemu/afaerber.git cocoa-for-upstream

Andreas Färber (3):
MAINTAINERS: Add Cocoa maintainer
vl.c: Guard against GThread double-initialization
cocoa: Close sheet after image file selection

 MAINTAINERS |    5 +++++
 ui/cocoa.m  |    2 ++
 vl.c        |    4 +++-
 3 files changed, 10 insertions(+), 1 deletions(-)
#1 lore raw

PATCH 1/3 MAINTAINERS: Add Cocoa maintainer

Degrade cocoa.m from Maintained to Odd Fixes.

---
 MAINTAINERS |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
MAINTAINERS +5 -0
index bccdd4f..7ee301e 100644
@@ -451,6 +451,11 @@ M: Anthony Liguori <[email protected]>
 S: Maintained
 F: ui/
 
+Cocoa graphics
+M: Andreas Färber <[email protected]>
+S: Odd Fixes
+F: ui/cocoa.m
+
 Main loop
 M: Anthony Liguori <[email protected]>
 S: Supported
Signature · 1 line
1.7.0.3
#2 lore raw

PATCH 2/3 vl.c: Guard against GThread double-initialization

In reply to Andreas Färber

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.

---
 vl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
vl.c +3 -1
index b56e0cb..624da0f 100644
@@ -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();
 
Signature · 1 line
1.7.0.3
#3 lore raw

PATCH 3/3 cocoa: Close sheet after image file selection

In reply to Andreas Färber

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.

---
 ui/cocoa.m |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
ui/cocoa.m +2 -0
index d9e4e3d..0711205 100644
@@ -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);
Signature · 1 line
1.7.0.3
#4 lore raw
In reply to Andreas Färber
Quoted 8 lines · Andreas Färber

Hello Anthony,

Please pull these Cocoa-related patches for 1.0.

For our long-standing uint16 compilation issue we are still in need of a fully correct solution. Depending on what we come up with, we'll try to squeeze it in between RCs or defer it to next.

Quoted 6 lines

Regards,
Andreas

The following changes since commit 2ff6458116546ced7ce00cc39423ee30b1477e67:
Anthony Liguori (1):
Merge remote-tracking branch 'kraxel/usb.29' into staging

Pulled. Thanks.

Regards,

Anthony Liguori

Quoted 16 lines

are available in the git repository at:

git://repo.or.cz/qemu/afaerber.git cocoa-for-upstream

Andreas Färber (3):
MAINTAINERS: Add Cocoa maintainer
vl.c: Guard against GThread double-initialization
cocoa: Close sheet after image file selection

  MAINTAINERS |    5 +++++
  ui/cocoa.m  |    2 ++
  vl.c        |    4 +++-
  3 files changed, 10 insertions(+), 1 deletions(-)