Am 28.02.2011 um 15:10 schrieb Benedikt Iltisberger:

Hey Peter,

I did it exactly like you proposed. Works perfect :-)
I am using following calls to make a selected window front most:

AXUIElementPerformAction(windowElement, kAXRaiseAction);

This should be sufficient to bring the window to front.

AXUIElementPerformAction(windowElement, kAXIncrementAction);

Are you sure this has any effect? As far as I can see, AXWindow doesn't have a settable AXValue attribute, so why increment a non- existing value?


I simply used the fact that and kAXWindowsAttribute arrange their arrays in the same order.
I did some testing and its working fine :-)


Fine it works for you like this - but I still see a problem:
The fact that two different APIs return the items in the same order on your configuration doesn't at all prove this is going to be true for other users' configuration, other OS versions...

Maybe we can find a cleaner solution before I have my Weissbier, so I keep asking for the key / value you inquire in CGWindowListCopyWindowInfo() to decide which is the desired window?


Thank you very much and I hope you are going to have a decent bavarian Weissbier tonight. I am going to have one for sure :-)

Kind regards,
Benedikt

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to