Irritating focus behaviour when closing window (other window of same app pops up)

Hello!


Assume I have a few Finder windows open, and some other apps.

Lets say I am working on a Pages document belonging to project A. While I am working, I use Spotlight to open a folder (i. .e. another Finder window) because I need to see some files that relate to the project (for copying/sending to someone, whatever).

When done with the files, I close the Finder window, in order to go on with my Pages document. But what happens? Instead of handing focus back to where it was before (i. e. on the Pages window), OS X throws a different Finder window on me! A window that in most cases is of no use at all, since it probably relates to a different project B, which I intend to work on in the afternoon.


Finder was just an example; the behaviour is the same with most apps, so it seems to be a problem of OS X.

This is a big distraction in dayly work, and it still annoys me after more than 5 years of using OS X.


If you watch closely, you see that together with the new Finder window, Spotlight also brings other finder windows in front right behind the new window, so it happens earlier. This is annoying, since it is a very poor and unrealistic assumption that all my Finder windows belong to the same project I am working on. The same goes for Safari/FireFox , Pages , whatever!


In some cases, windows are brought to focus even at the cost of switching me to a different space (desktop) — even more distracting.


Is there any cure for this?


I have already switched off "group windows by app" and "when switching app, choose a Space that has open windows of that app" in the system preferences. (Sorry, the options are translations from German, so probably not the same words.)


(I am using Witch as a helper to improve window switching, but it does not seem to be able to fix the above problem.)


Thanks for any ideas.

Philipp

MacBook Pro with Retina display, OS X Yosemite (10.10.3)

Posted on Jun 25, 2015 2:50 AM

Reply
15 replies

Feb 15, 2016 2:20 PM in response to BATman4God

I've found this situation very frustrating as well -- just adding my voice to those who would love to see an option to return focus to the previous window that had focus (in whatever app happens to own it) than to close the new window and leave us in the app which the new window happened to be associated with.


It is all-the-more irritating when the window you close was the only active window in that app so focus goes 'nowhere' from a windowing point-of-view--just to the owning app running in the background which has no windows.


The only "work-around" I'm aware of is to use COMMAND-Q to quit from the new window--which quits the owning app too--and gets you back to where you came from. But if the new window was one of several active in the app whose window you are leaving, then this isn't what you want as it closes all the other windows in the related app.

Jun 25, 2015 3:35 AM in response to Barney-15E

Barney-15E, Thanks for your reply.

Well, the easiest thing would be to just let focus go to the window that was active before, not by force holding it within the same app.

This is one of the rare issues where MS Windows is so much better. You always get the previously-used window right away, no matter whether it belongs to the same app or to another one. This is so much a better guess than "stay in same app".

Its such a pity for OS X!


cmd-Tab suffers from the same problem - it switches between apps, not between windows. So, using cmd-Tab, throws a bunch of windows at me, just because they belong to the same app. But I dont need 5 Finder windows showing me folders that belong to 5 different projects, I just want the single one that belongs to the current project – chances are 95% that this is the most-recently used one. The other windows are just covering up my work, cluttering my desktop (and my mind ;-) ).

Witch is a great relief for this, but it does not solve the first problem, maybe because cannot go deep enough into the OS.


I am still hoping thre is some hidden OS X option or preference somewhere...

Jun 26, 2015 2:56 AM in response to Barney-15E

It seems to depend on the kind of work one is doing. There seem to be scenarios where Apples approach is useful. For me it is the opposite.


In my opinion, Apple is not consequent. They have no window borders, because its not about windows, its about documents. A very beautiful and good approach. But then, I dont see why the app is so dominant.


Ill try to explain using a physical world metaphor:

I am doing some crafts work. I am using a pair of pliers, a pencil, a paper knife, and a few pieces of paper. The paper is from a box next to me. The pliers are from my toolbox, where I also keep a hammer, a few screwdrivers etc., some of which lie on the table next to me, but somehow beside. The pencil is from a box of pens in front of me, which is open. There are many pieces of paper on my desk, one right in fornt of me relating to my current work, but others relating to another project, and some are just general notes papers from phone calls inbetween.


So, there are 2 "apps" that I am using: The tools from the toolbox, and a notepad (or box with paper).


During my work, I often put my workpiece aside to look at the paper or take some notes or make drawings. Or Put the knife down and draw something on the sheet of paper in front of me. But each time I put the knife down and reach for the sheet of paper, all pieces of paper on my whole desk move to the front, covering everything else.

Thats what OS X does. It feels like a gust of wind messing up your desk!

Then, when I have rearranged everything, it throws the screwdrivers at me, when I put down the paper to take the pliers (which happen to belong to the same toolbox).


Granted, You could well argue that my desk is a mess, but I must say this is just a realistic scenario for me. I dont have time to remove all other pieces of paper from my desk, especially when there are phone calls coming in etc.


In most projects, I use different tools. I hardly use only paper, and I hardly use only knives in one project.


So, if there is a grouping of items, I see sence in grouping by project, but not by application.


However, without any grouping, just letting things be as they are (i.e. dont put a window in front) I believe that also people who work in a single app will be equally satisfied, because that would not make any difference in their scenario. The last-used window would just be the one from the same app, which is the intended behaviour, I would assume....?

Jun 26, 2015 5:11 PM in response to philippp

Great analogy, Philippp! And yes, I don't think the apps needs to "talk" to each other; the problem has to lie in the OS. As evidence, I submit that when I overlap a Safari window with a Finder window and click on the Safari window to browse online, Safari doesn't move all of its windows in front of the Finder window. It only moves them in front of the Finder window if I CLOSE the Safari window.


Cdhw, thanks for your tips. I didn't know about tabs in Finder and that will help me.

Jun 25, 2015 8:12 PM in response to Barney-15E

I'm not asking the OS to guess where I want to be. I'm simply asking it to do nothing. If I close a window, just close the window and don't move a window from that same app in front of another window. I've arranged the windows I need in front purposefully. I don't need to OS to rearrange them automatically. Tell me, do you usually work with apps in full screen mode? I do not. I have multiple windows from multiple apps arranged so that I can work between them. For example, I will have a PDF file in Preview, a Finder window with a certain folder, and a Safari window. All three windows are related to the same work, and I have purposefully arranged them so they overlap but so that part of each shows through so I can easily move between them by clicking on them. I do not wish for the OS to rearrange my windows when I close Finder or Safari. The ones I have placed behind are those unrelated to my current work and I have put them back there for a reason. It's extremely irritating for Finder or Safari window I'm not using to automatically come to the front.

Jun 25, 2015 3:02 AM in response to philippp

I Don't know how to make it work another way. Applications, not their document windows, are the primary actors. Just because you close an app's document window doesn't necessarily imply you wish to switch back to another app you were using before, so the OS would have to read your mind each time. The safest course of action would be to remain within the app.

The only thing I can suggest is use the facility that exists, cmd-tab. The most recently used app,will be next in sequence.

Jun 25, 2015 7:50 PM in response to BATman4God

If I'm working in an App and I finish using a document, I generally wish to stay in that app to create another document. I don't necessarily want to return to some place the OS guesses I want to be. Since I know where I am, and where I want to go, I just cmd-tab back to the previous app if that's what I want. If I want to go back two applications, I cmd-tab twice. If it's been a while and I can't remember where I was, I slide three fingers up the trackpad and select a document from Mission Control. None of that requires the OS to guess at what I want to do.

Jun 26, 2015 3:56 AM in response to philippp

Security constraints prevent one application from being able to know about, or control, the windows of other applications. This limits the extent to which one application can act as a seamless 'helper' for another. It's a pity that sandboxing has made this technique so difficult for developers, but it's the price one pays for security in a world where even a simple 'Notes' app needs an internet connection.


I'd recommend taking a step back from the problem and reviewing whether any of the relatively recent enhancements to OS X could be used to give you a more amenable experience. A few examples I have in mind are:


Try using 'tabbed' Finder windows as your default. This would cut down the number of Finder windows, possibly to 1, so that they didn't obscure your work.


Try using 'spaces'. Perhaps working with your application in one 'space' and keeping the Finder windows open in another would help. You can then swipe back and forth between two spaces.


Try using the 'cmd H' key-combination to hide Finder windows. If you get into the habit of closing a Finder window by holding down cmd and then typing W H in quick succession.


All these techniques feel slightly odd to start with, but use them for a day or so and your muscle-memory will soon learn them.


C.

Jun 26, 2015 6:10 AM in response to cdhw

cdhw,

thanks for your response,


Yes, tabs are a nice feature (I know them from PathFinder, which I acually use), and I am often using tabs, however they are not always handy for drag and drop. I mostly use tabs within a project, but never across projects. Because having tabs from different projects in one window would be even more confusing, and using tabs prevents the folder name from showing up in the window name, so it even prevents me from finding the riight one in the "window" menu (or in Witch's alt-tab list).

Ttabs are very helpful, but not actually a cure for my original problem.


Spaces: Yes, I am using spaces. OS X seems to prioritize apps even over Spaces - there are situations where I am suddenly moved to a different space, just because a window pops up that is in a different space! Even more annoying.

Spaces are a really helpful feature, but they dont actually solve the problem.


Cmd-H: Hiding all windows of a specific app at the same time is nice, but then, how do I get a specific one of the hidden windows back on my screen?

When I cmd-tab back to that app later, it once again throws all its windows at me at the same time. Even when I use Witch's alt-tab hotkey to bring up one of the hidden windows, all of them splash at me on top of everything else. So this acutally makes it worse.


Security: Good point, but why should the apps talk to each other?

Cmiiw, but I am sure it is a system call that an app must do to show a window on the screen. And the operating system (OS) controls the windows (hands mouseclicks to them, etc) — so the operating system definitely knows all windows that exist, and must ultimately have the power to put windows in front or not (even if apps can request focus, of course). I do not see a need for having one app to talk to the other.


And, at Apple, user experience usually goes over any technical hurdles — so I am even more disappointed by this issue (which to me Apple seems to be ignoring since 30 years???).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Irritating focus behaviour when closing window (other window of same app pops up)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.