Re: Watching for new windows
Re: Watching for new windows
- Subject: Re: Watching for new windows
- From: Mike Engber <email@hidden>
- Date: Thu, 20 Nov 2003 13:38:30 -0800
Now that I see what you're trying to do I can suggest a way to do it.
When you get the notification that the frontmost app has changed, you
can ask the app for its window list and determine what's in front from
there.
The reason cocoa doesn't send a main window changed notification is
because the main window of an app didn't change. I.e. if you'd asked
the app for its main window before and after the app was frontmost
you'd have gotten the same answer both times.
-ME
On Nov 20, 2003, at 11:49 AM, Modesitt Software wrote:
On Nov 19, 2003, at 10:01 PM, Bill Cheeseman wrote:
His remarks suggested that the extra notification was coming from
Carbon,
but, if I understood him correctly, that the duplication only
happened when
an application element in a Cocoa application was targeted. (It seems
like
this is the opposite from what the person who started this thread
reported,
but I'm not sure I understood exactly how he encountered the duplicate
notifications.)
I started this thread, and I seem to get the opposite of this bug. My
intent is to log the frontmost window of the current application.
When my app starts, it creates an observer for (almost) every process
running. When the user changes windows using the current application,
my app is notified. So far so good. However, when the user switches
to a Carbon application, my observer receives two identical
notifications. When the user switches to a Cocoa application, my
observer receives no notifications. So I get either two or zero
notifications when the user switches to a different app, but all I
really want is one!
Thanks,
Bill
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.