Gray background behind app windows?
Duncan Champney <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sep 18, 2009, at 3:00 PM, [email protected] wrote: > From: Duncan Champney <[email protected]> > Date: September 18, 2009 2:18:39 PM EDT > To: [email protected] > Cc: Steve Sheets <[email protected]> > Subject: Gray background behind app windows? > > > Folks, > > Apps like Photoshop (PS) used to have an option to blank out the > desktop behind their windows to a flat gray. That reduced visual > clutter so artists could focus on the app's windows. > > I have Photoshop CS3, not CS4 (I tend to update every other time to > try to save a little money) so I don't know how it works in CS4, but > in CS3 under Leopard, it looks like PS turns the document window > into a "super window" that fills the whole screen and has gray > borders all the way around. > > Our company is working on rewriting a legacy OS 7/8/9/ app for OS X > (>= 10.5), and the legacy app has the option to blank out everything > behind the app's windows to dull gray. > > Does anybody know a way to do this in OS X without either going to > full-screen mode (and losing Cocoa's support for document windows, > tool palettes, etc.) or turning the front document into a monster > that takes up the whole screen, with the content placed in a > resizeable view in the middle? That's doable, but less elegant than > the gray background old OS 9 apps used to use, and doesn't allow the > user to see more than one document window at a time. > > > > Thanks in advance, > > Duncan C > WareTo LLC > > > > > > > > From: Kyle Sluder <[email protected]> > Date: September 18, 2009 2:56:29 PM EDT > To: Duncan Champney <[email protected]> > Cc: [email protected], Steve Sheets <[email protected]> > Subject: Re: Gray background behind app windows? > > > On Fri, Sep 18, 2009 at 11:18 AM, Duncan Champney <[email protected]> > wrote: >> Does anybody know a way to do this in OS X without either going to >> full-screen mode (and losing Cocoa's support for document windows, >> tool >> palettes, etc.) or turning the front document into a monster that >> takes up >> the whole screen, with the content placed in a resizeable view in the >> middle? That's doable, but less elegant than the gray background >> old OS 9 >> apps used to use, and doesn't allow the user to see more than one >> document >> window at a time. > > Create a screen-sized NSWindow and set its level using -[NSWindow > setLevel:]. > > --Kyle Sluder > > Kyle, What level should I use? I would want the gray window to be behind all of my app's other windows, but in front of other apps and in front of the desktop. I could not find a level value for setLevel that would do what I needed. I tried most of the different available level settings, but no luck. Right now I am working on creating a screen-sized window with styleMask: NSBorderlessWindowMask, at the default level for my app, then using -orderBack to put it behind my other app windows. The problem with that is that if I click on the gray window, the system brings it in front of my other app windows. I tried overriding NSWindow's -mouseDown method and having that method do nothing, but the system still brings the gray window to the front. How would I get the system to ignore mousedowns in the window so it does not get moved to the front? Duncan