> On Apr 8, 2015, at 11:38 PM, Ken Thomases <k...@codeweavers.com 
> <mailto:k...@codeweavers.com>> wrote:
> 
> On Apr 8, 2015, at 9:19 AM, Tomáš Znamenáček <tomas.znamena...@gmail.com 
> <mailto:tomas.znamena...@gmail.com>> wrote:
> 
>> I should have mentioned that Finder behaves unlike other apps in this
>> regard. If I do the same with any other app, the app is correctly focused,
>> stealing focus from whatever app was focused before. (And the menu bar on
>> the display “gets focus”, too. Gets opaque, anyway.)
> 
> In the Finder, the desktop can be the main/key window.  For example, you can 
> cycle to it using Command-`.
> 
> Regards,
> Ken
> 
I NEVER noticed that before.
It’s weird because it IS a window, but it doesn’t order above others, so it 
isn’t totally obvious that the desktop has focus, and because its window level 
is so low, if you have multiple windows from other apps open, it’s extra not 
obvious.

Wow. This is a nice trick to know, but mostly not useful if you cannot see what 
you are selecting with the keyboard. Kind of scary actually to now realize this 
behaves this way. (it certainly explains curiously named items on my desktop 
over the years, and I have  weird feeling it’s been like this for forever and a 
day…)

So sounds like the trick is the window ordering, but that’s hard to tell with 
the desktop.

As a workaround though
[[NSWorkspace sharedWorkspace] launchApplication:@"Finder.app"];

Seems to do what Tomas is asking for.
Even selecting desktop first, the launching an app with this as the only thing 
in applicationDidFinishLaunching: brings Finder to the front with the front 
most (non desktop) window selected.

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to