* [Qemu-devel] [PATCH v2] Makes -full-screen option work on Mac OS X
@ 2015-01-12 16:46 Programmingkid
2015-01-14 17:09 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Programmingkid @ 2015-01-12 16:46 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel qemu-devel
This patch makes the -full-screen option actually instruct QEMU to enter fullscreen at startup.
Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
Removed the set_to_full_screen variable.
Removed the scanForFullScreenOption() function.
ui/cocoa.m | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 685081e..4cb07ba 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1163,6 +1163,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];
+ [[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
+ }
+
dcl = g_malloc0(sizeof(DisplayChangeListener));
// register vga output callbacks
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Makes -full-screen option work on Mac OS X
2015-01-12 16:46 [Qemu-devel] [PATCH v2] Makes -full-screen option work on Mac OS X Programmingkid
@ 2015-01-14 17:09 ` Peter Maydell
2015-01-14 18:20 ` Programmingkid
2015-01-20 19:33 ` Programmingkid
0 siblings, 2 replies; 4+ messages in thread
From: Peter Maydell @ 2015-01-14 17:09 UTC (permalink / raw)
To: Programmingkid; +Cc: qemu-devel qemu-devel
On 12 January 2015 at 16:46, Programmingkid <programmingkidx@gmail.com> wrote:
> This patch makes the -full-screen option actually instruct QEMU to enter fullscreen at startup.
>
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>
> ---
> Removed the set_to_full_screen variable.
> Removed the scanForFullScreenOption() function.
>
> ui/cocoa.m | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 685081e..4cb07ba 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -1163,6 +1163,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];
> + [[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
> + }
> +
> dcl = g_malloc0(sizeof(DisplayChangeListener));
>
> // register vga output callbacks
This generates a compile warning for me:
/Users/pm215/src/qemu/ui/cocoa.m:1150:55: warning: instance method
'-toggleFullScreen:' not found (return type defaults to 'id')
[-Wobjc-method-access]
[[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
^~~~~~~~~~~~~~~~
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Makes -full-screen option work on Mac OS X
2015-01-14 17:09 ` Peter Maydell
@ 2015-01-14 18:20 ` Programmingkid
2015-01-20 19:33 ` Programmingkid
1 sibling, 0 replies; 4+ messages in thread
From: Programmingkid @ 2015-01-14 18:20 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel qemu-devel
On Jan 14, 2015, at 12:09 PM, Peter Maydell wrote:
> On 12 January 2015 at 16:46, Programmingkid <programmingkidx@gmail.com> wrote:
>> This patch makes the -full-screen option actually instruct QEMU to enter fullscreen at startup.
>>
>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>>
>> ---
>> Removed the set_to_full_screen variable.
>> Removed the scanForFullScreenOption() function.
>>
>> ui/cocoa.m | 6 ++++++
>> 1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/ui/cocoa.m b/ui/cocoa.m
>> index 685081e..4cb07ba 100644
>> --- a/ui/cocoa.m
>> +++ b/ui/cocoa.m
>> @@ -1163,6 +1163,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];
>> + [[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
>> + }
>> +
>> dcl = g_malloc0(sizeof(DisplayChangeListener));
>>
>> // register vga output callbacks
>
> This generates a compile warning for me:
> /Users/pm215/src/qemu/ui/cocoa.m:1150:55: warning: instance method
> '-toggleFullScreen:' not found (return type defaults to 'id')
> [-Wobjc-method-access]
> [[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
> ^~~~~~~~~~~~~~~~
I will see what I can do.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Makes -full-screen option work on Mac OS X
2015-01-14 17:09 ` Peter Maydell
2015-01-14 18:20 ` Programmingkid
@ 2015-01-20 19:33 ` Programmingkid
1 sibling, 0 replies; 4+ messages in thread
From: Programmingkid @ 2015-01-20 19:33 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel qemu-devel
On Jan 14, 2015, at 12:09 PM, Peter Maydell wrote:
> On 12 January 2015 at 16:46, Programmingkid <programmingkidx@gmail.com> wrote:
>> This patch makes the -full-screen option actually instruct QEMU to enter fullscreen at startup.
>>
>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>>
>> ---
>> Removed the set_to_full_screen variable.
>> Removed the scanForFullScreenOption() function.
>>
>> ui/cocoa.m | 6 ++++++
>> 1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/ui/cocoa.m b/ui/cocoa.m
>> index 685081e..4cb07ba 100644
>> --- a/ui/cocoa.m
>> +++ b/ui/cocoa.m
>> @@ -1163,6 +1163,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];
>> + [[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
>> + }
>> +
>> dcl = g_malloc0(sizeof(DisplayChangeListener));
>>
>> // register vga output callbacks
>
> This generates a compile warning for me:
> /Users/pm215/src/qemu/ui/cocoa.m:1150:55: warning: instance method
> '-toggleFullScreen:' not found (return type defaults to 'id')
> [-Wobjc-method-access]
> [[[NSApplication sharedApplication] delegate] toggleFullScreen: nil];
> ^~~~~~~~~~~~~~~~
Would you accept a patch that eliminated this warning by disabling
-Wobjc-method-access?
The problem is Objective-C classes usually are in two files, the
header and the .m file. Cocoa.m places both the interface and
implementation of the QemuCocoaAppController in one file,
so that is why I think we are seeing this message.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-20 19:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12 16:46 [Qemu-devel] [PATCH v2] Makes -full-screen option work on Mac OS X Programmingkid
2015-01-14 17:09 ` Peter Maydell
2015-01-14 18:20 ` Programmingkid
2015-01-20 19:33 ` Programmingkid
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).