When you see a foremost window, and a window behind it, you’d think that Cmd-W would always close the foremost window, right?
Switch to the Finder, open a new window, then choose the menu “View” and submenu “Show View Options”. Then, press Cmd-W.
Instead of the foremost window, which is a utility window, closing, the regular window behind it closes.
Utility windows are distinguishable by their smaller window controls, and by their behavior: they float over other windows. They always have a close button, but the keystroke shortcut is never hooked up. You have to click that tiny tiny close button yourself.
Because of the control size, it isn’t hard to distinguish utility windows from regular windows. But during the kind of rapid-fire UI interactions that power users love, it’s easy to accidently treat the Find window of Acrobat Reader 5 (utility) like the Find window for Text Edit (regular). To treat the Palettes window of Interface Builder (utility) like the Catalog window of CodeWarrior’s Constructor (regular). After enough “D’oh” moments, I start to get frustrated, and I slow down.
My advice? Avoid using utility windows whenever they might be mistaken for normal windows, like when they overlap normal windows. Don’t use them when you might want to close them often.
But they can be done right. Have a look at Photoshop, where the utility windows are “docked” to the side.