Task Switcher moves to non-primary display on Mavericks-Catalina I'm running OS X on a computer with two displays that are not mirrored.

One of them is configured as the primary display using the menu bar location in Displays System Preference, pre-Mavericks style. (Although both displays actually have the menu bar.)

Problem: cmd + tab Task Switcher sometimes appears in secondary display instead of the primary. Once it starts appearing on the secondary display, it might soon move back to the primary, too.

Questions:


Why does this happen? I have seen it more than once but haven't yet figured out the pattern.
How to configure the task switcher to appear only on the primary display?


According to this similar question, How to choose on which display Application Switcher shows?, the behavior depends on which display has the dock. Follow-up variant question:

2'. How to configure the dock to appear only on the primary display?

This also happens on all later releases through at least Catalina.
I answered a similar question here - cmd-tab behavior on Mavericks with multiple displays

The Task Switcher does follow the Dock.  If the Dock is on screen 1, the Task Switcher will appear on screen 1.  If the Dock is on screen 3, the Task Switcher will appear on screen 3.  Etc.

To make your Dock appear on a screen you can use a couple of methods.

Method 1 - Move your mouse to the bottom of the desired display.  Don't stop once you reach the bottom of the display though, try to move it further down, as if you're pushing down on the bottom of the display with your cursor.  This action tells the Dock to move to this display.  This is temporary however, meaning the Dock will stay on this display until you perform this action on another display or reboot your Mac.

Method 2 - This will change the default starting point for your Dock.  In System Preferences > Displays > Arrangement you can drag the menu bar from one display to another in this windows display icons.  See the attached picture for reference.  This alters the default preference to always show the Dock on the desired display, the one you drag the menu bar to in this preference pane, when you boot and/or login to your user account.  You can still use method 1 to temporarily change the Dock's location but upon a reboot it will return to the display specified here.