77

Using Mac OS on multiple monitor is great, but after removing external monitor (2nd monitor) usually windows position originally on the external monitor doesn't get re-positioned to default monitor. Is there any shortcut key or utilities that can reset window position for this kind of usage?

2

13 Answers 13

70

From my answer originally at Server Fault Question 7237:

When a monitor is unplugged (including the adapter as well if applicable - leaving the adapter leaves OS X thinking the monitor is still plugged in) all the Windows should move onto your main screen. Occasionally some windows (eg. Firefox) will keep their position on the very far right of the screen leaving you just enough room to grab the title bar and move it where you'd like to.

One method of arranging the Windows so you can see them (if for some reason they're staying off screen) is to change to the application that owns the window in question, hold the Option key down and choose "Arrange in Front" from the Window menu. It will then arrange all the windows of that application in a cascade from the top left of the screen.

SEcondly, there are several AppleScripts available (eg. this one at Snipplr) that will also grab every window off screen and move it on screen for you.

There is also a nifty shareware app called Stay that will help automate a lot of this for you, while there is also ControlPlane which will do much more than just notice if a monitor is disconnected and allows you to run scripts (in case you want to do more than just rearrange the windows). ControlPlane is free, but doesn't have any direct mechanism for moving windows (you have to attach it to one of the aforementioned AppleScripts).

7
  • "Gather Windows" only affects—and is only meant to affect—the System Preferences "Display" windows.
    – Araxia
    Apr 25, 2012 at 16:55
  • @Araxia: Fixed. Odd because I could of sworn I've used it that way before (but it definitely doesn't work that way in Lion)
    – Chealion
    Apr 25, 2012 at 18:35
  • You can rearrange windows with Divvy too
    – Irfan
    Dec 3, 2012 at 9:33
  • The script from Snipplr worked great. I have not tried the script with X-windows applications yet, which Divvy does not seem to be able to resize.
    – harijay
    Jul 25, 2014 at 7:45
  • On Mavericks, click that application, on menu bar, Click "Window" > "Bring All To Front"
    – Ivan Chau
    Sep 22, 2014 at 7:12
6

You can also go to Displays and choose turn off/on mirroring and it resets the windows.

4

breeze has global and application window states. the states can be triggered using they keyboard and are resolution independent. pair this with sizeup and windowflow and you'll be set.

3

Try

Window -> cascade

Does this fix your issues ?

3
  • 1
    This option is not available in OSX Sep 5, 2012 at 4:19
  • 4
    Works for Powerpoint 14.2.1 on MacOS 10.7.4
    – m-p
    Sep 17, 2012 at 20:28
  • OK, it doesn't appear in OSX 10.6.8 apparently... Hmmm. Lucky Lion user Sep 17, 2012 at 20:55
2

Hold down the option key and click on the application's icon in the dock twice. The first click will hide the window and the second click will resize the window to fit in the single window.

1
  • This is the best answer, it works on macOS Sierra too.
    – Justin
    Mar 1, 2017 at 20:34
1

I had a similar query for a friend that uses an external monitor with a Macbook, and he suggested SizeUp. I haven't looked into it yet, but it may be what you're after.

1
  • is it possible that size up is causing the windows to move to the edge of the screen when i wake up my mac?
    – Andy
    Jul 2, 2014 at 20:04
1

You can go to System Preferences > Displays and change the resolution to something lower, say 1024 x 768 or 800 x 600 and it will cause windows to reset to that smaller display size. Change it back to what you had an all off screen windows should appear.

1
  • think this worked
    – malhal
    Feb 19, 2017 at 21:06
1

I once had a weird case where I can only see the application window when switching between spaces. I knew it's somewhere to the left of the screen; I tried many methods described here with no avail.

Eventually, I rearranged my main and external display in display preference so that on is to the upper left of the other, and eventually the window showed up.

1

None of these worked, then I read about a trick to delete the plist file. That deleted everything including my registration for the app I was trying to gather the main window, which was open, when I last closed it.

Then I tried the following and succeeded: I changed the key MainWindowFrame to s.th. below my screen resolution, in my case:

<key>MainWindowFrame</key>
    <array>
        <integer>**2237**</integer>
        <integer>474</integer>
        <integer>834</integer>
        <integer>704</integer>
    </array>

to:

<key>MainWindowFrame</key>
    <array>
        <integer>**1000**</integer>
        <integer>474</integer>
        <integer>834</integer>
        <integer>704</integer>
    </array>

That finally did the trick!!!

1
  • 3
    which plist file did you edit?
    – rennat
    Aug 18, 2015 at 16:12
1

When you run multiple displays of different resolutions on Mac, Mac appears to "pretend" that all of the monitors actually have the same vertical resolution by creating "virtual" display realestate to fill in the gaps between each of the smaller displays and the largest display. For example, I have a macbook pro and a 27" Cinema display.

I run my Cinema display at its native resolution, 2560x1440, and the my macbook at the far-right, "more space" setting (it's smaller than 1440, but it doesn't tell me exactly what it is). Because of how I have my monitor and laptop situated on my desk, I use the "arrangement" tab in system preferences to align the bottom edge of the displays. When I do this, there is a section above the macbook screen that is shown as blank or empty in the arrangement window.

HOWEVER, I discovered that if I rearranged things such that the top edges of my displays were aligned, my missing application window was quietly waiting for me at the top-left of the laptop monitor space, thinking it was on-screen and visible the whole time. From there, I discovered that by moving my laptop screen back down to align with the external monitor at the bottom, the system was kind enough to force the now hidden window to the top left of my Cinema display.

0

I keep the displays preference in the menu bar (there's an option in the displays preference for this). Then whenever the monitor arrangement changes and OS X doesn't detect it you can click here and choose 'Detect Displays'.

Alternatively you could script that action in Automator and assign it a shortcut key yourself. See this link for more information

0

I had the same issue when using Pixelmator and having some windows off screen when trying to use it the day after I had been using it at home with my laptop connected to a monitor. Simply go into your displays, set your res to something lower, click the 'gather windows' button and then set your res back to normal and you should see all your Pixelmator (or whatever application) windows.

0

Another thing you can do is go into expose (I think three finger upwards swipe by default), and drag the window onto another screen. If you can get at the bottom righthand corner, it'll pop the window to the top of the screen.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .