Re: From Panther to Tiger
Re: From Panther to Tiger
- Subject: Re: From Panther to Tiger
- From: John Stiles <email@hidden>
- Date: Mon, 16 May 2005 13:44:52 -0700
On May 16, 2005, at 1:01 PM, Roy Lovejoy wrote:
I am maintaining a Carbon application whose history goes back to
pascal code circa 1985..
They were using third party source that handled floating palette z-
ordering (legacy code from before Mac Window Manager handled it)..
Introduced in Tiger, and _never_ before occurring, if you call
GetWindowList(), the first window in the list will actually be the
menu bar.
The code base was relying on a third party library with an
erroneous 'IsWindowActive()' call that basically compared a
WindowPtr in question to the first non-floating palette in the
GetWindowList() chain..
In Tiger's case, it was this new 'Menubar window' (my guess it's an
HIView)..
So for 21 years, this code was kosher, albeit crufty. In Tiger,
this new behavior caused *ALL* of the mouse clicks in *ALL* the
windows to be ignored, because the app was in constant state of
"the user clicked in a non-foreground window, Select it, then the
next click will be valid"...
Followers of Carbon-dev will note that Panther was the first OS
release to put the menubar in the window list. In Panther, though,
the OS actually made a special case for some window-list calls to
exclude the menubar from the list, because some third-party apps made
invalid assumptions about the topmost window. At that time, I believe
Apple did mention that these special cases were temporary measures
and that you should update your code to never make assumptions about
the first entry in the window list.
For that matter, the menubar isn't the only window that the OS could
create on top of all of your windows--the inline input floater, if
showing, would normally show up first in the window list, above all
application windows. This has been true since Carbon in OS X 10.0.
A Carbon app which makes assumptions about the window list—i.e. my
windows will be the only windows in the window list, or this document
window that I created frontmost will be the first item in the window
list—was always broken. The menubar window makes it very clear about
the breakage, as opposed to other cases that tended to be rare, but
just because code works most of the time, doesn't make it correct. In
Panther they made some hacks in the OS layer to placate certain apps
(they didn't specify which ones), and in Tiger the hacks were removed
and the true window list is exposed to the Carbon layer.
Your code was never kosher since OS X 10.0—inline input floaters
would have broken it since the very beginning. And Apple gave
adequate warning, and even an 18-month grace period. There's no room
for a weak excuse here.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden