Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have this problem sometimes with my dual-screen setup, especially when I'm juggling lots of things around.

Occasionally I seem to be able to move a window entirely off-screen (I'm not quite sure how) and I can't get it back. If I do a 'hide all' in the application's menu (usually it's Mail.app, so let's stick to that one for the example), everything disappears and Mail seems to think it's got an 'inbox' window in the Windows menu, but there's nothing visible. Closing and restarting the app doesn't seem to help (as the app is helpfully remembering where my window previously was) and all I end up doing is shutting down the Mac, unplugging the second monitor and restarting it, opening the application again and this seems to persuade the Mac to rethink the main window position, and all is well. I can then restart the second monitor, etc.

Is there a better way? Is there some way of marshalling windows back to a specific monitor, or a utility for moving 'open'/running windows? Am I actually doing something wrong? :-)

I'm not using Spaces, by the way - so I'm pretty sure this isn't some weird Spaces issue. :-)

share|improve this question

10 Answers 10

up vote 19 down vote accepted

Chealion answered this on SuperUser.

I won't copy and paste his answer here, as he got the credit not me.

But basically, what you could do is (quoted from Chealion's answer) :

A second 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.

share|improve this answer
Oh, brilliant - thanks! I've upvoted his answer there, and given you some credit here for pointing me to the right place. There are some good suggestions there, and I almost can't wait for the problem to occur again now. :-) –  robsoft Aug 27 '10 at 10:07

For completeness:

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 is before you unplug the external monitor (or before you unplug the dongle) is to open up the Displays Preference Pane in System Preferences and click on the "Gather Windows" button. This is supposed to bring every window on the main screen and the option does not appear if you don't have a second monitor plugged in.

A second 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.

Lastly, 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 MarcoPolo 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).

share|improve this answer
+1 for originally having found the solution. –  Studer Aug 27 '10 at 19:59
+1 ditto @Studer's comment! :-) –  robsoft Aug 30 '10 at 10:32

Also, for completeness, I came across this: Stay app for Mac although I haven't tried it or bought it yet.

From their website:

Stay can store a set of windows for every combination of displays that you use with your computer. For example, if you have a laptop that is sometimes connected to an external monitor, you can store two sets of windows in Stay; one with the external monitor connected and one without. This done, you’ll be able to ensure that your windows are always where you want them to be by having Stay restore windows whenever you connect or disconnect the external monitor. Stay can even be configured to automatically restore windows as displays are connected and disconnected.

share|improve this answer

Something I tried and it worked for me is switching the resolution to a lower one and then bring it back up. And it just magically puts the application to centre. Cheers.

share|improve this answer

I found this application : WindowWrangler

It allows one to use keyboard shortcuts to move the window.

Unfortunately, it does not work for the only window I need: Inkscape in an XQuartz environment.

share|improve this answer
Did you find any solution for xquartz? –  gebirgsbärbel Apr 17 '14 at 10:08
The solution I found was to connect an external monitor: in that case, the window changed is position in a way I could move it. I move it so that, after disconnecting the screen, the window top bar is "accessible". –  lauhub Apr 17 '14 at 10:10

I just had this same problem in Mavericks, I managed to solve the problem by following these steps:

  1. Take the pointer to an edge of the window that moved off screen, for example to the edge on the right.
  2. When you see the resize icon (in my case the horizontal resize icon) click and hold.
  3. While "holding down the click" drag the window. Voila!
share|improve this answer

I have a solution that worked for me and I trawled forums and tried everything I could possible.

In the end I found a way. Install an app called BetterTouchTool. This allows you to make a shortcut to do various handy things with your screen etc. Then setup an app specific shortcut (much easier than it sounds), and make it simple. I set it so that a "two finger swipe- up" led to a "Maximise window" action. This stuck the missing application on to my laptop screen and away from the phantom monitor screen it had been stuck on.

Problem solved.

Here's an image of what BetterTouchTool looked like when I'd set the shortcut up:

BetterTouchTool Shortcut

share|improve this answer

You can create a simple app to do it in the AppleScript Editor. Enter the following text and save it as an app. If you put it in your Applications folder it will be easy to access via SpotLight. I named mine gather windows.

property processesToIgnore : {}
tell application "Finder"
    set _b to bounds of window of desktop
    set screen_width to item 3 of _b
    set screen_height to item 4 of _b
end tell
tell application "System Events"
    set allProcesses to application processes
    set _results to ""
    repeat with i from 1 to count allProcesses
        set doIt to 1
        repeat with z from 1 to count processesToIgnore
            if process i = process (item z of processesToIgnore) then
                set doIt to 0
            end if
        end repeat
        if doIt = 1 then
            tell process i
                repeat with x from 1 to (count windows)
                    set winPos to position of window x
                    set _x to item 1 of winPos
                    set _y to item 2 of winPos
                    if (_x < 0 or _y < 0 or _x > screen_width or _y > screen_height) then
                        set position of window x to {0, 22}
                    end if
                end repeat
            end tell
        end if
    end repeat
end tell
share|improve this answer

A friend of mine wrote a free tool for bringing back the windows, if you want to check it out, go here: http://bring-em-back.com

share|improve this answer

I have two screens and loading Inkscape put it somewhere inaccessible. I could see it by using "show all windows", but if I selected it from there it went and disappeared again. The solution I found came from this mailing list comment.

When unplugging the second screen I could see Inkscape. But then even after moving it around a little, if I plugged the other screen back in it disappears off the edge again. The solution is to unplug the second screen, grab the title bar of the window and while still grabbing it plug the monitor back in. (!)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.