Switching spaces on one monitor affects open applications on other monitor; looking to prevent this

Kind of hard to describe. Using Yosemite 10.10.3. Using a mac with two monitors. Left monitor has one desktop space. Right monitor has two desktop spaces.

I use a lot of terminal windows at work (4 on my left monitor, primary (and only) desktop space, and 4 on my right monitor but on the secondary desktop space… that means my left monitor has one desktop space and my right monitor has two desktop spaces) but I noticed that they are NOT separated by the physical monitors. Specifically, if on my right monitor, secondary space, I go and bring a different application "to the front" (and therefore, showing "on top" of any other windows I might have open, such as my browser) it will automatically bring another window from that application "to the front" on my LEFT monitor. Details of my specific problem below:

What I like to do is switch to the secondary desktop space on my right monitor when I need to use those 4 terminal windows when troubleshooting something, but at the same time I need my left monitor to not show its OWN 4 terminal windows since I need to be reading documentation or something and at the same time use my right monitor primary desktop space for documentation as well. In this ideal situation, I would have let's say two browsers on both monitors (left monitor, primary desktop space; right monitor, primary desktop space) and 4 terminal windows readily available for when I need to use them (right monitor, secondary desktop space).

When I swipe my magic mouse on my right monitor in order to view the secondary desktop space, which is where I keep 4 extra terminal windows on my right monitor, it automatically brings the last used terminal window on the left monitor to the front view, blocking the application (browser, in this example). I have confirmed that the specific terminal window on the left monitor that comes "to the top" and covers my browser is the last terminal window that my mouse has clicked on prior to clicking on my browser on the left monitor (in order to bring my browser "to the front" or "on top" so I can read).

As I swipe back and forth between spaces on my right monitor, I have to constantly move my mouse to the left monitor and click on my browser in order to bring it to the front and hide the terminal window. I have to keep doing this over and over and over and over… very annoying, and I can't figure it out.

I know this isn't the best explanation (it is Friday, and I am tired), but I think I made myself clear enough to anyone who uses dual monitors on Mac.

My question is:

  1. Why is this happening? If Terminal (as a program) was treated as an individual "entity", then I would expect all 4 terminal windows on the left monitor to "pop up" to the front and cover my browser application, but instead only one does but not the others.

  2. More importantly, how can I fix this so that each terminal window is "independent" and won't be influenced by other terminal windows.

I tried a multitude of combinations turning off/on the four options in Mission Control (auto rearrange spaces; switch to a space with open windows; group windows by application; displays have separate Spaces). All four of these do not clear my problem.

The "Auto rearrange spaces based on most recent use" definitely has something to do with this though. When I type on one of the 4 terminals on the left, reproduce the problem, the last terminal window I typed on is the one that pops up. I was able to change which ones pop up to the front on the left monitor by typing on a different terminal window on the left. Unfortunately, declicking Auto rearrange spaces based on msot recent use does not fix this.

It appears I am looking for an "Do not bring last used windows to the front when alt-tabbing (yes I am going to use a Microsoft term) between programs" option.

Instructions to reproduce my issue:
Set up so you have dual monitors; one space on left monitor, two spaces on right monitor. Open 8 terminal windows in your left monitor. I believe Terminal will automatically open the windows in the left monitor. Swipe your right monitor to the secondary desktop space. Move four out of the 8 terminal windows to right monitor secondary space. Move right monitor back to primary space. Open browser in left monitor to cover all terminal windows. Swipe right monitor to secondary space that has 4 terminal windows. Click on one of those right monitor terminal windows. The last used terminal window on the left monitor will pop up (a.k.a "bring to the front") covering your browser


I'm going to post this as an answer, even though it's not the one you probably wanted...

Your issue is that you have one app spread to two Spaces.

There is no fix for this at present, short of duplicating the app & re-defining it at OS-level to be recognised by the System as an independent app [which, as I understand, must be done at compile. I'm not a coder, but I've had this explained to me by one who is, for a very similar usage case I employ myself.]

A workaround might be to employ two completely different apps as Terminal emulators & keep one in each Space.

BTW, the quirk of only one window coming to the front is a Yosemite bug, mainly but not entirely fixed in El Capitan. You can temporarily cure it by killing the Dock & letting it respawn. This works some of the time. If it doesn't, a reboot should, for a while.

It's actually triggered by - you guessed it... having windows for one app spread across two Spaces ;-)