43 Folders

43 Folders feed subscription icon - Shiny!Time, Attention, and Creative Work. After 4 years and a lot of productivity pr0n, we’re shifting gears. Re-learn how to use 43 Folders. Then back to work. [»]

”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.

Open Thread: Developing for Full Screen Mode?

Full Screen Mode is a topic that comes up a lot here and abroad — it’s a way to set a given application to operate with as few menus, panels, and other navigational widgets as possible, claiming the entire screen, and enabling the user to focus exclusively on one task without distraction.

Essentially, it temporarily hobbles your maddeningly versatile Mac into a machine for doing exactly one thing, being whatever is appearing in your single Full Screen window. And you might be amazed what a nice thing that can be sometimes. It’s great for writers in particular, so it’s perhaps not surprising that writing applications seem to be leading the Full Screen charge. Although you can also get FSM in Firefox using extensions and in Safari with the help of Saft.

So my question, for you Mac developers in the house: I’m curious to learn more about Full Screen mode and how hard it is to make it a part of Cocoa applications. I’ve gotten the impression that Cocoa has “hooks” in place to hide the Menu Bar and claim all the screen space with a given document’s front window, so I’m curious whether it’s something that’s difficult to implement. I’d love to request it in some favorite applications of mine (Hi, again, Allan!). What do you guys say? Piece of cake or pony?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jpb's picture

Please don't make it the...

Please don’t make it the only mode for your application. I hate when applications assume they can grab the whole screen - I frequently have long-term things like compiles or downloads going on in background windows and want to be able to see what kind of progress is being made while I do something else in the foreground.

Merlin Mann's picture

Please don’t make it the...

Please don’t make it the only mode

I can’t think of any apps like that that I’ve come across.

In my experience, with the exception of, say, “DVD Player,” FSM is something you deliberately call up for a purpose then flip off when you’re done. Although I could be wrong. What app’s doing that to you now?

Peter's picture

Last summer I tried my...

Last summer I tried my hand at developing a plugin for Terminal.app that made it full screen, and I ended up with a solution that works about half way. The API call to hide the dock and menubar is one line of Carbon code, but making the actual window frameless is slightly more involved.

My solution was to call Carbon to hide the dock and menu bar, then tell the window to zoom, which fills the screen but doesn’t hide the window’s title bar. I had to tweak a preferences file by hand to change font sizes and window postion settings, which is why I haven’t released it.

Christopher Peterson's picture

As a recent Switcher, my...

As a recent Switcher, my main gripe about Mac OS X is that 90% of Mac apps refuse to go full screen. If Fitts’ Law is good enough for the Mac OS system controls, why not the apps, too?? I don’t want to scroll unnecessarilyl and I want my scrollbar in the “Fittsable” location on the right side of the screen!

My second gripe about Mac OS X is the lack of consistent, universal keyboard shortcuts (especially for arrow key navigation within an app).

Gideon's picture

I hate that full screen...

I hate that full screen windows… I will not use them, ever. The main two reasons: I can not read text that is that wide and it kills my work flow between applications.

Fondomatic's picture

Did it once for a...

Did it once for a movie player project. Used AppleScript Studio. Trivial to use a call method…

Fraser Speirs's picture

Hmmm, what's required? You subclass NSWindow...

Hmmm, what’s required?

You subclass NSWindow and override - (BOOL)canBecomeKeyWindow to return YES.

Then you instantiate it, passing NSBorderlessWindowMask as the styleMask parameter of a call to NSWindow’s -initWithContentRect:styleMask:backing:defer:screen: initializer.

Then you probably want to pass something like CGShieldingWindowLevel() to NSWindow’s -setLevel: method before setting the window’s frame (CORRECTLY handling the case where -[NSScreen screens] returns an array of more than one item (i.e. you’re on a dual display box)) and putting it on-screen.

Oh, and don’t forget to capture some keystroke so people can get out of your fullscreen world!

Zeno's picture

It's actually quite easy to...

It’s actually quite easy to do it in Cocoa…. by subclassing NSWindow (playing a bit with its initWithContentRect:styleMask:backing:defer: method); no need to “hide” the menu bar, just set the window’s level to something higher than NSMainMenuWindowLevel. This is actually how most 3rd party apps are implementing the FSM. Look for example at VLC: when you’re in FSM hit Shift+Command+F11 to actually slow down the Exposé effect and find out that the full screen view is nothing more than a “normal” window. Even Apple apps (DVD Player and QuickTiime Pro Player) use this method; but others (like Keynote.app) use a more “sirius” FSM that can’t be exposé-ed.

Merlin Mann's picture

Thanks, guys. This is awesome....

Thanks, guys. This is awesome. Over me head, but useful and awesome. :-)

It would be great if there were some kind of haxie for emulating/inserting this in apps that don’t have FSM baked in.

Peter's picture

If any of you are...

If any of you are interested here’s the code. It’s messy and probably really bad, but it was(is) my first Obj-C project.

I thought about subclassing the Terminal.app window when I was writing it, but it turns out that you have to assign NSBorderlessWindowMask to the window at creation time and I couldn’t figure out how to move the contents of a current window to a new one. That’s why I used the hide-and-zoom method.

Oh, by the way, my plugin uses SIMBL to inject code at runtime into existing apps, so you have to install that first. The author hasn’t touched it in awhile and I bet there’s a better method now.

About Merlin Mann

Merlin Mann's picture

Bio

Merlin Mann is an independent writer, speaker, and broadcaster. He’s best known for being the guy who started the website you’re reading right now. He lives in San Francisco, does lots of public speaking, and helps make cool things like You Look Nice Today. Also? He looks like this, answers questions, and has something like a life.

Merlin’s favorite thing he’s written recently is a short essay called, “Better.”

 
EXPLORE 43Folders THE GOOD STUFF

An Oblique Strategy:
Not building a wall; making a brick


STAY IN THE LOOP:

Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed

Inbox Zero

The original 43 Folders series looking at the skills, tools, and attitude needed to empty your email inbox — and then keep it that way. Don’t miss the free video of Merlin’s Inbox Zero presentation.

Making Time

3-part series on attention management for artists and makers. Read Bad Correspondence, The Job You Think You Have, and One Clear Line.