• 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: Peter Lübke <email@hidden>
  • Date: Mon, 28 Feb 2011 18:38:39 +0100


Am 28.02.2011 um 16:55 schrieb Benedikt Iltisberger:

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.

I was not able to reproduce this behaviour. Are you sure the AXWindow element is still valid when you call it again?



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



Important to know you let the user select the window, maybe from a popup button? In this case, simply gather the AXTitle attributes for the application's kAXWindowsAttribute elements. Populate the popup button (or whatever you present to the user) with these. The selection will tell you which AXWindow to raise.


Representing AXTitle attributes to the user is presumably a lot more transparent than everthing CGWindowListCopyWindowInfo() is guaranteed to provide, since kCGWindowName is only an *Optional* Window List Key, and, as the docs say: "...(Note that few applications set the Quartz window name.)"

Cheers,
Peter

_______________________________________________

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: Izidor Jerebic <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>)
 >Re: WindowID to front (From: Benedikt Iltisberger <email@hidden>)

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