383

It seems that Mac OS X 10.6.1 Snow Leopard has a tendency to leave some windows off-screen at times, especially when I disconnect an external monitor from my MacBook. How can I move the window back on-screen when it's not possible to grab the title bar and drag it back onto the screen?

XvsXP.com recommends adjusting your screen resolution downward to have off-screen windows "snap back into view" and then adjust your screen resolution back to its original setting. In OS X 10.4 Tiger, I had a script that brought all off-screen windows back on-screen, but in my upgrades to Leopard and now Snow Leopard, I don't seem to have that script.

Any better solutions out there?

kba
  • 357

22 Answers22

418

This method seems to work: click on the Window menu, then click Zoom

Hai Vu
  • 6,200
156

Haven't read through the whole thread but the easiest way I found was to change the resolution of the screen:

Go to System preferences » Displays and then change the resolution.

This will force your computer to render the display again and reposition all open windows. Then just switch it back to your original resolution settings and everything should be back in place.

Brad Koch
  • 151
66

If you can see a portion of the window, hold down the Option key and then click on one of the borders of the window. This will allow you to drag the window into full view.

56

Three ideas:

  • CmdF1 (or CmdfnF1 if you've configured your MacBook's keyboard to use normal function keys) toggles your displays between mirror mode and extended desktop. A side effect is that windows get moved around somewhat unpredictably. This might move the missing window to somewhere visible. This likely requires the external monitor to be connected though.

  • Turn on Spaces, hit the hot key to displays the spaces overview and see if your missing window outline is visible there. If so, drag it to where you want it to be.

  • Quit the application and relaunch. Definitely a non-ideal solution and not practical if there's unsaved work.

slhck
  • 235,242
Doug Harris
  • 28,397
42

Some windows can be moved by for example dragging them horizontally from the bottom edge.

You could also try running scripts like this in AppleScript Editor:

tell application "iTunes"
    set bounds of windows to {100, 100, 800, 800}
end tell
tell application "System Events" to tell window 1 of process "UltraEdit"
    set position to {100, 100}
    set size to {800, 800}
end tell
neu242
  • 1,416
Lri
  • 42,502
  • 8
  • 126
  • 159
22

None of the above worked for me, but I managed a fix by changing:

  • System Preferences
  • Hardware
  • Displays

Then go to the 'Arrangement' 'tab' and drag the external window on top of the internal one (instead of side-by-side).

slhck
  • 235,242
Michael Durrant
  • 221
  • 2
  • 2
13

If Window/Zoom option from menu won't help (as suggested in 1st answer):

Window/Zoom on OSX

(this could happen when application has it's own non-standard implementation of the Window menu like Adobe Photoshop),

you've to go to Displays Settings and select 'More Space' (Scaled) option.

See:

Displays - Scaled - More Space

If you'd like to have some permanent solution, please install BetterTouchTool, which provides extra options (gestures) for moving the windows. In example:

BetterTouchTool - Move windows

kenorb
  • 26,615
10

I had this problem with Parallels desktop 6 in OS X Lion, whereby the VM's actual window was hidden off-screen, and only visible in Mission control, and when you swiped between spaces.

So for those with the same problem, and hopefully this is applicable elsewhere: The solution is to right click on the Application's icon in the Dock, then go to the 'Options' menu item, and under 'Assign To' choose 'This Desktop'. That should move the app window back on to the current desktop. Still preferred the old spaces pref pane for this sort of thing - much faster.

Hope that helps those stumbling upon this post, with the same problem with Parallels (as I did)

Note that on Lion, there is no Assign To option in this position.

bwDraco
  • 46,683
9

If you still have an external display hooked up, or are reconnecting the external display, and at that point have the window offscreen and unmanagable, it is possible to right-click the icon for that application in the dock and force the window to snap to the other display.

This will allow you to adjust the window position without the need to modify the resolution of displays or open the system preferences tab. Still not as easy as an MS Windows solution, but definitely easier than going through all of the rest of that hassle.

slhck
  • 235,242
8

I have found a way, by using "Force Quit ...", by clicking the  icon in left top corner.

Use it to force-quit the app, then start it again. It starts fresh, and the window is on-screen.

slhck
  • 235,242
wgui
  • 89
7

Hold option + click the app icon in the dock two times and it will first minimize, then restore the windows into full view on your desktop.

Justin
  • 275
5

None of the above methods worked for me on OSX 10.7.4. I was trying to access KeePassX, which was completely off the screen. (I had moved it to a second display at home, but was now at the office, with no second display.)

Changing resolution back and forth had no effect. Closing the app and opening it up again, had no effect.

However, when I closed the database, and asked to open a new one, it moved the window so I could access the dropdown to select a file. (yay!)

kenorb
  • 26,615
3

The position of the views are saved in the nib files themselves. The way I fixed this was to make a change to the View and then saved it. Shut down Interface Builder and started it again. My window and view where gathered back to the main screen. I have to say that I tried all the options before doing this. That is the Zoom, deleting the .plist from Library/Preferences, F8, Gather Windows... None of those worked. I hope this helps.

Nima
  • 1
3

I tried pretty much everything above for a token app called SecurID we use for VPN access for work. This AppleScript finally solved it (courtesy of http://www.leonamarant.com/2008/04/02/how-to-get-off-screen-windows-back-on-your-mac-os-x-v105/)

-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...}
property processesToIgnore : {}

-- Get the size of the Display(s), only useful if there is one display
-- otherwise it will grab the total size of both displays
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
DustinB
  • 151
2

I wonder why it was not mentioned before but there is a very simple way to solve it.

You can grab one of the horizontal or vertical edge of the window (not the corners, though) and move the mouse parallel to the edge, not in the direction you normally would in order to resize the window.

That is, if you move the horizontal edge of the window horizontally or the vertical edge vertically then it does not resize the window but moves the whole. Now you can drag the missing part of the window back to the screen.

2

Go to System Preferences » Displays » Detect Displays.

It will force the system to rescan, and detect the missing monitor... That typically solves the problem when I run into it.

Also, if that doesn't work, and your system still believes that the monitor is connected try two things:

  1. If you have the cable still connected (but unconnected to a monitor), disconnect it.
  2. On the arrangement tab on the displays panel, try "Gather Windows". That should gather all the windows to the active / primary monitor.
slhck
  • 235,242
2

The simple answer for me, if you're just completely removing external monitors (e.g., for going to a conference with your laptop) is to just close the lid and open it again. All of the other answers (^1, Zoom, moving windows) did not work for me.

1

The WindowZoom method is interesting and likely what I'd use if not for Moom. It lets you set up hotkeys for repositioning and resizing windows. I have a 9 cell grid (altoption1-9) as well as left/right halves and a few others.

The Moom default for centerring and expanding a window is controlshiftz then space - I changed this to altz. Super useful for screencasts too as you have much greater control over window positioning.

Koobz
  • 268
0

A third party solution is to use HyperDock. It is compatible with macOS 11.1 Big Sur but not later versions of macOS.

This utility modifies the Dock to show a preview of each application’s windows floating above the application icon.

These are draggable, so you just pick the window you wish to view and drag it to the monitor you need to see it on.

0

For extreme cases, like I'm encountering with Interface Builder, you can try re-connecting your second monitor, finding that missing window and then dragging it back to the primary display.

Now, to check your work, quit the program and then re-launch it ensure that all of the desired windows are living on your primary display.

Now, disconnect the second monitor - things should be ok.

JJ Rohrer
  • 161
0

So interesting that no one has mentioned the simplest solution of all of them. Just close the laptop lid and quickly open it, it will force the window manager to reset.

0

In my situation, the window disappeared on Mavericks after I unplugged one of my external monitors. I still had another external monitor plugged into my MacBook Pro, while the windows moved from the unplugged external were shifted to my built-in display. One window for Chrome was well outside the actual display, but with the way screens and "Spaces" work in Mavericks no part of it showed on the other displays.

The easiest way I have found is to open Exposé (either by pressing F9 if you have re-enabled that keyboard shortcut, or by swiping up with three or four fingers depending on your configuration) and drag the missing window from one monitor to another. This will cause OS X to position the window within the bounds of the new monitor automatically, and it will be visible again.

Bryson
  • 431