AXRaise problem with Cocoa apps
AXRaise problem with Cocoa apps
- Subject: AXRaise problem with Cocoa apps
- From: Rainer Brockerhoff <email@hidden>
- Date: Fri, 12 Dec 2008 18:04:41 -0200
Howdy folks,
I'm running into a weird problem with my Klicko utility (http://www.brockerhoff.net/klicko).
Basically, I install an event tap to identify clicks on background windows.
If the clicked-on window is not a main window, I send AXRaise to it to bring it to the front. Also, if the app it belongs to isn't the front process, I call SetFrontProcess on it to make it so.
That seems to work well for either case, and also with Carbon apps. However, for Cocoa apps, this doesn't work consistently if the app is in the background _and_ the window isn't the main window.
Usually, the window I'm AXRaising _does_ become the main window but it stays behind the window that was the main window before that! Most confusing.
I'll be submitting a bug on this - it's reproducible with some care by using the Accessibility Inspector to do the AXRaise. But I don't suppose this will be fixed anytime soon, so I'd need a workaround.
Things I've tried, none worked in all cases:
- Simulate a click on the window's title bar
- Various orders, delays combinations of the AXRaise and SetFrontProcess calls.
Suggestions welcome...
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden