From: Programmingkid Date: Tue, 19 May 2015 08:11:17 +0000 (+0100) Subject: ui/cocoa: Make -full-screen option work on Mac OS X X-Git-Tag: v2.4.0-rc0~130^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43227af88a36faed50cedb0c7cef71a49c0be9d2;p=thirdparty%2Fqemu.git ui/cocoa: Make -full-screen option work on Mac OS X This patch makes the -full-screen option actually instruct QEMU to enter fullscreen at startup, on Mac OS X. Signed-off-by: John Arbuckle Signed-off-by: Peter Maydell --- diff --git a/ui/cocoa.m b/ui/cocoa.m index 351b71ffad5..d1d29bc304b 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1161,6 +1161,12 @@ void cocoa_display_init(DisplayState *ds, int full_screen) { COCOA_DEBUG("qemu_cocoa: cocoa_display_init\n"); + /* if fullscreen mode is to be used */ + if (full_screen == true) { + [NSApp activateIgnoringOtherApps: YES]; + [(QemuCocoaAppController *)[[NSApplication sharedApplication] delegate] toggleFullScreen: nil]; + } + dcl = g_malloc0(sizeof(DisplayChangeListener)); // register vga output callbacks