• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WindowID to front
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WindowID to front


  • Subject: Re: WindowID to front
  • From: Benedikt Iltisberger <email@hidden>
  • Date: Mon, 28 Feb 2011 16:55:26 +0100

Hey Peter,

you are right.
AXUIElementPerformAction(windowElement, kAXIncrementAction); Has no effect.
I also recognized that the AXRaise seems to be not exactly what i wanted.
If I raise a window for the first time it works fine. If I raise other windows after that and try to raise the first window
again it sometimes doesn't become the "frontMost" window. I guess I have an error in my understanding of AXRaise.

You are right. This is not a suitable solution. I was just happy to see that it could work.

The keys I inquire in CGWindowListCopyWindowInfo() are: kCGWindowOwnerPID and kCGWindowNumber (but kCGWindowNumber is totally pointless here because i cannot use it for accessibility api). I try to gather all windows which belong to the same ProcessID so the user can select one and set it front most (using AXRaise).

Cheers
Benedikt





On 28.02.2011, at 16:03, Peter Lübke wrote:

>
> 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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: WindowID to front
      • From: Peter Lübke <email@hidden>
References: 
 >Re: WindowID to front (From: Peter Lübke <email@hidden>)
 >Re: WindowID to front (From: Peter Lübke <email@hidden>)
 >Re: WindowID to front (From: Benedikt Iltisberger <email@hidden>)
 >Re: WindowID to front (From: Peter Lübke <email@hidden>)

  • Prev by Date: Re: WindowID to front
  • Next by Date: Re: Accessibility in custom NSControl subclasses
  • Previous by thread: Re: WindowID to front
  • Next by thread: Re: WindowID to front
  • Index(es):
    • Date
    • Thread