OS X and Fullscreen?

27712 - Cocoa - Taking Window Fullscreen - Toolbar background will take WIndow Background Color
Status: Needs ReviewRank: Not RankedProduct: XojoCategory: Framework » Macintosh (Cocoa)

Using either the MBS Lion plugin to allow Fullscreen, or using the Declares from the Xojo Platform Specific example, if you have “Custom Color” turned on in the Background of the Main window, when you go fullscreen, the Toolbar will change its background to whatever background color the window is.

If Custom Color is off, then it works as it should. Test project attached using the example declares (no plugin required!)

Painted the white color in a Canvas for now.

Yup, it sure does :slight_smile: I searched for Cocoa, hence why I didn’t see that!

FYI, I’m adding this for posterity in case it comes up as a search in later years. The feedback report has been closed due to it not being a bug per se, but a “feature” of the OS. Basically even a pure Xcode Simple app with an NSWindow and the background having a color will do the same.

Bottom line, fill a Rect or Canvas as I have done :slight_smile:

[quote=13761:@Norman Palardy]Thats the exact bug we need to resolve before we feel its ready to release as part of the framework :stuck_out_tongue:
The issue we had is that most times the workaround Sam posted works around it - but not always - and thats why we haven’t used it or released it.[/quote]
Norman / Joe - is there any update? Although I have a 27" iMac on my desk, I do most of my work on my 11" Air and Xojo is the only app that I can’t go full-screen in (and it’s the one I need it most on).

See cases 23015 , 27901, and 27986.

“Implemented” - cool, thanks - hopefully it arrives in the next update.

A workaround is to use a timer. Once the menubar has been shown, mouse events come back.<<

I cant find any example of this: how are you using a timer to fudge the menu display?

When going full screen, the menu bar and dock remain. Some applications, though, like QuickTime, have a “full full screen” mode, where only the app appears.

I was going to ask here, and then I found this post in StackExchange that explains how to set the info.plist file with

<key>LSUIPresentationMode</key> <integer>4</integer>

That allows the app to do that.


This plist key is more designed for kiosk mode applications. Is that what you’re after?

I am experimenting with an app where I use a full screen window to change the cursor shape over the entire desktop, to seek a different desktop experience and play with animated cursors of different sizes. When the dock is here, it makes the cursor back to standard, and worse, if the user clicks there or in the empty desktop space around, it inactivates the app.

I looked for a way to simply hide the dock when in full screen mode, and put it back afterwards, but could not find that in the forum. So when I located LSUIPresentationMode I thought I would share it for others to know at least one way of getting an entire screen full screen.

Okay, thought I’d just check.

As for the custom cursors, Xojo includes functions for this or if you want more control NSCursor also does the same thing.

From the sound of it, I think Michel is trying to allow Mac users to make custom cursors to use globally in the OS.

Then I’d certainly check the NSCursor object, see if that will allow this before experimenting with different techniques.

That is what I will do. Thanks.

No worries - if there is already an OS provided means of doing this, then it’s best to use it, IMHO.

Sure. I will first have to learn Xcode, and then when I am greyer, maybe discover it does not do what I want. Think I will pass for now. Every time I go through Apple doc, why is it I have the sinking feeling that it is intended to be obscure ?

Thank you for your help Sam. Lucky you are to speak Objective-C and Chinese. Both out of my league. I will stick to Xojo and European languages for now.

No need to learn Objective-C just yet, I’m sure the MacOSLib features dojo objects for NSCursor. If not let me know, as I can easily add this to the Retina Kit (being that a Cursor is basically an image).

lol… Both of which, only a little… I frequently end up getting it wrong and ordering a napkin cup of tea, or vanilla hot dog. Salt is the hardest thing for me to get, I always end up with cigarettes!

I have learned all importantly how to say “Samsung products are the equivalent of dog poo”.

I found a mention of NSCursorAttributeName in MacOSLib, but that is all. What I find frustrating in Apple doc is that contrary to what MS does, they do not post clearly the call and parameters. Is Objective-C so far from C# and C++ that I cannot make heads and tails of what is described ? I feel extremely limited and ready to give up until a next life.

I went back to the custom fonts thread where you helped me with NSFontManager. When I try to read the Apple NSFontManager class reference, I do not even see how you get from the cryptic descriptions in there to

bool CTFontManagerRegisterFontsForURL( CFURLRef fontURL, CTFontManagerScope scope, CFErrorRef * error );