At 6:28 PM -0500 on 3/10/01, Edwards, Waverly wrote: >I have a problem. I *need* to know the front window no matter what >application is in front. It appears that my choices are to create a >jgnefilter to know when application switches occur and patch FRONTWINDOW so >that I can get the frontmost window. My other choice is to use the >'undocumented' layer manager. I was able to find the headers for the layer >manager or atleast part of them. There is absolutely no mention of the >layer manager anywhere on apples site. My only information came from a >MacHack CD that I own. > >The window list is private to each application. Window lists are not shared >between apps which makes getting this information extremely difficult. >Accessing the lowmem global _windowList is only valid in the current app >because the list gets switched out by the process manager when a major >switch occurs. > >Know matter how much research I did, those are the only two choices that >came up under system 7. I found a technote under system 8 that shows you >can send an appleevent to get a window under a point. This would work great >except my program will also be running under system 7. > >Neither of my choices are good choices. > >Anyone have a better way to get a window list that is not from the current >application? I know you've been working on the Window Layer Manager (most of it is now gone on OS 9 according to those in the know) I was browsing around USENET and came across a few similar questions. Most answers didn't seem too clear on how to get the front window globally. I thought I would mention what I did find, just in case it's of any help. The Time Manager is available as far back as 6.0.3 , I'm not totally sure how this works though. If you are operating in another process' address space I'm sure you could get more than the window title. 'In classic MacOS it was possible to get the window title of another process' front window by simply using the time manager. A timer task can periodically call FrontWindow, then GetWTitle while it is executing in another process' address space.' This was mentioned but as you know it doesn't work properly: 'To find out what Window is in front globally, you'd have to walk the window list. Search the archives at deja.com and you should find some code.' I did search the deja.com archives and there isn't a lot. The Layer Manager was mentioned but a regular says that is was never official per Apple and most of it is removed as of OS 9 -- Heather Donahue -- non sum qualis eram