Mac OS X: Fundamental problem with layering and cycling through windows

Posted by Pierre Igot in: Macintosh
October 6th, 2005 • 2:04 pm

This is a problem that affects pretty much all applications in Mac OS X, and that I find particularly glaring. I am going to describe it in a scenario that involves the Finder and TextEdit, but it could really be any pair of Mac OS X applications.

First of all, let’s examine a scenario that produces the “normal” behaviour. Say you have one document window open in the Finder and two document windows open side by side in TextEdit, and the windows are arranged so that the width of the Finder window actually spans both TextEdit windows.

Here’s a screen shot illustrating such a situation:

Two TextEdit windows and one Finder window

Now switch to the Finder so that the Finder window is in front of both TextEdit windows. Then click on one of the TextEdit windows directly. This brings the TextEdit window in question to the foreground (and switches to the TextEdit application), but, because of the way Mac OS X works, the other TextEdit window stays behind the Finder window, even though the TextEdit application is now the front application.

That is expected.

Now use the keyboard shortcut to cycle through windows. It’s command-~ on US keyboards (I think) and command-ù on my Canadian CSA keyboard. This is a shortcut that works in most Mac OS X applications and cycles through all open windows in the current application.

In my scenario, pressing the “Cycle Through Windows” shortcut once results in the other TextEdit document window coming to the front. The other TextEdit document window (the one that was in front before I pressed the keyboard shortcut) becomes a background window. (There can only be one window in the front at any given time.)

More important, however, is the fact that the other TextEdit window, while it is now a background window, is still in front of the background Finder window. This is expected, since this window was the front window before I pressed the shortcut, so now that I have pressed the shortcut, it is ranked window #2 in the window layering order, behind the other TextEdit window that is now the front window. The Finder window is ranked window #3, because it was the front window before the other TextEdit window.

No problems here. Again, this is expected.

Now consider what happens with the same scenario, but with three TextEdit windows instead of two.

Here’s a screen shot illustrating this other situation:

Three TextEdit windows and one Finder window

Now switch to the Finder so that the Finder window is in front of the three TextEdit windows. Then click on one of the TextEdit windows directly. This brings the TextEdit window in question to the foreground (and switches to the TextEdit application), but, because of the way Mac OS X works, the other two TextEdit windows stay behind the Finder window, even though the TextEdit application is now the front application.

This is expected.

Now use the “Cycle Through Windows” shortcut once in TextEdit. This causes one of the other TextEdit windows to come to the front.

But it also causes the current TextEdit window to become a background window and to be relegated behind the Finder window!

This is purely and simply wrong. The order in which I brought the windows to the front is the following:

  1. Finder window
  2. TextEdit window A
  3. Text Edit window B

So the order that the window layering scheme should use is (from front to back):

  1. TextEdit window B
  2. TextEdit window A
  3. Finder window

But the order that Mac OS X actually produces is:

  1. TextEdit window B
  2. Finder window
  3. TextEdit window A

Eeek.

Like I said, this affects all Mac OS X applications, not just the Finder and TextEdit. And I encounter this problem all the time in my work, because I am constantly switching between applications, and I often do so by clicking on one application window, and then cycling through the others with the “Cycle Through Windows” shortcut.

Of course, this problem can be avoided by switching from application to application using the command-Tab application switcher (which brings all application windows in front of other applications), or by clicking on the second window instead of using the “Cycle Through Windows” shortcut.

But that’s no excuse. This is a major flaw in Mac OS X’s window layering scheme. (Needless to say, I have already submitted it as a bug report.)


One Response to “Mac OS X: Fundamental problem with layering and cycling through windows”

  1. Olivier says:

    Thanks! Drives me crazy too but never got around to filing a bug report as I found it quite difficult to explain (other than “Please fix the bloody window cycling bug ASAP!” of course”).

    Keep us informed of the status of your bug report.

Leave a Reply

Comments are closed.