Rocking the blogosphere

OS X: How to resize an off-screen window?

When I switched from two monitors to one (I have an external monitor at work), one of my XTerm windows was left in a state where it’s resize handle is off-screen. I can’t resize it, nor can I move it, since it’s already at the top of the screen.

Any tips or freeware for fixing this problem?

Mac OS X v10.5 Leopard
Advertisement

Mac OS X v10.5 Leopard is packed with over 300 new features, installs easily, and works with the software and accessories you already have.

Del.icio.us Digg Reddit Technorati

Possibly related posts

Comments

  1. January 27th, 2007 | 12:16 pm

    [...] It occurs to me that perhaps I should create a Mac OS X annoyances page. The first two items would be this issue and the fact that you can only resize windows from the bottom right corner (which sometimes ends up off-screen). [...]

  2. tim
    January 28th, 2007 | 12:28 am

    This is definitely my #1 OSX pain point. It happens to me with Quicksilver all the time when switching from my desktop monitor to my laptop screen.

    I just found this tip:

    I don’t know how well it works, but it would make my day if it did.

  3. Hendrik
    February 22nd, 2007 | 12:36 pm

    I run into this problem all the time as well. Really annoying.
    Hopefully window management will improve with Leopard.
    I’d love to hear about a freeware fix for this. The Applescript tip works, but I’d like something more automatic.

  4. Hendrik
    February 22nd, 2007 | 1:22 pm

    Ha. I surfed the web some more and came up with a solution.
    And I thought I’d share it here. You still have to select the offending window, for example using Expose and then hit a keyboard shortcut.

    Create this Applescript in Script Editor and save it under ~/Library/Scripts/

    tell application "System Events"
        set FrontApplication to (get name of every process whose frontmost is true) as string
        tell process FrontApplication
            set position of window 1 to {0, 22}
            --window 1 is always the frontmost window.
        end tell
    end tell
    

    Then set up a Quicksilver keyboard trigger for the script and you are set.

  5. April 16th, 2007 | 6:39 pm

    Hi Hendrik,

    Thanks for posting your script! For some reason, as written (and with the quotes and dashes fixed :-) ), it didn’t work on my system, so I had to tweak it a bit so that it didn’t think the script itself was the frontmost application:

    tell application "System Events"
        tell (a reference to (first process whose frontmost is true))
            set visible to false
        end tell
    end tell
    
    tell application "System Events"
        set FrontApplication to ¬
            (get name of first process whose frontmost is true) as string
        --display dialog "FrontApplication = " & FrontApplication
        try
            tell process FrontApplication
                set position of window 1 to {0, 22}
                --window 1 is always the frontmost window.
            end tell
        on error
            display dialog "Exception - FrontApplication = " & FrontApplication
        end try
    end tell
    
  6. April 16th, 2007 | 7:27 pm

    [...] I mentioned before, one of my Mac OS X annoyances is the fact that sometimes I manage to get application windows off [...]

  7. Richard Wagner
    April 29th, 2007 | 11:30 pm

    A similar problem that’s frustrated me has to do with a finder window which contains rows of icons which exceed the size of the window. I would like to be able to drag the bottom row of icons down to make room for new rows of icons directly above the bottom row. I used to be able to solve in previous OS X versions (I believe Jaguar). I could shrink the window, use the scrollbar to scroll to the bottom row, then expand the window to create space at the bottom and move the icons. In Panther and Tiger, this feature was taken away. Now if I expand the window, the rows of icons move with the window and leave no space at the bottom. Is there a something I’m missing or a solution available (assuming you understand my explanation). Thanx, RW

  8. emma
    May 3rd, 2007 | 8:22 am

    Hi,
    I just wanted to add on to this, as I had terrible difficulty, and couldn’t get either script to work (being rather a novice), and I’m ashamed to admit – neither could I work out how to add the keyboard shortcuts, even using quicksilver (great little app, by the way).

    What I did want to add though, was that my problem was with Parallels desktop. I’ve just found out that the XP window inside the Mac OS, doesn’t have a re-sizing handle, and that you have to set two different display resolutions – one for the XP window inside the Mac OS, and one for full screen XP (which also sometimes alter of their own accord.)

    Hope this helps someone.

    (Also, shift + Ctrl with click is right click under Parallels – something else I just found out!)

    Emma

  9. May 7th, 2007 | 5:13 pm

    I want to create a quiksilver trigger to change the size of the first window to either the left half or the right half.
    Please tell me if one can do it.
    I tried this, but it didn’t do anything.

    set YSize to 1050
    set XSize to 1680
    tell application “System Events”
    set FrontApplication to (get name of every process whose frontmost is true) as string
    tell process FrontApplication
    set y1 to 22
    set x1 to XSize/2
    set x2 to XSize
    set y2 to YSize
    set bounds of window 1 to {x1, y1, x2, y2}
    end tell
    end tell

  10. Tim
    May 8th, 2007 | 2:29 pm

    I just stumbled across this blog after having the same problem with a Finder window that exceeded the bottom of my display. I found that for me changing the dock position in System Preferences resized the offending window. I moved the dock back and everything is back to normal.

  11. ijeff
    May 12th, 2007 | 10:35 pm

    You can just option click the zoom button. This will expose the You can then resize the window.

  12. Greg
    September 4th, 2007 | 9:45 pm

    Choose Zoom off the Window menu and the offending window (if it is frontmost) will get within the bounds of the screen.

    I had this problem in Excel all the time–some freak program code would make my sheets be all tucked way up under the menu bar and ungrabbable. Took me ages to realize that I could just Window>Zoom to tame them.

  13. Greg
    September 4th, 2007 | 9:48 pm

    At the moment I have the reverse program. I am trying to get an Applescript to tuck a window part way up under the menu bar, but no matter how tucked up I set it for, it always only goes up until it hits the menu bar.

    So, frankly, I don’t know how some of these programs manage (even inadvertantly) to make their windows go up into the ungrabble zone.

  14. Susan
    October 4th, 2007 | 9:34 am

    Window/Zoom works a treat, thanks Greg.

  15. Rex
    December 4th, 2007 | 11:03 am

    Just ran into this with the VMware Fusion main “library” window being so far offscreen (to the right) that the zoom button itself was inaccessible.

    Since I was running in dual-monitor mode (the laptop screen on the right, main monitor on the left) I was able to regain control by temporarily turning on “mirroring” in the display preferences, then turning it off again.

  16. Peter
    February 7th, 2008 | 8:31 pm

    I have this problem with Eclipse but it is as if Eclipse is stuck in full screen mode. It will not budge and there is no Window option to zoom or minimize/maximize. Rather frustrating. Is there any AppleScript parts that can be suggested?

  17. Warren
    March 13th, 2008 | 6:49 am

    When I had this problem with Eclipse, I just resized my monitor resolution and OS.X collected all the windows to fit into the smaller resolution.

  18. Michael
    March 17th, 2008 | 1:51 am

    I’m still having this problem with Eclipse. Neither resizing my monitor nor running either AppleScript worked, and there is no window menu to speak of. I don’t know who to be frustrated with more: the Eclipse developers, or Apple. This is such a ludicrously simple UI thing that I’m amazed this is such a problem.

  19. Michael
    March 17th, 2008 | 1:55 am

    By the way, for those who are having this problem in Eclipse, the best solution I’ve found is to just “reset perspective” from the main Eclipse window (which, if you’re anything like me, is not the window you’re having problems with).

  20. Fender
    March 27th, 2008 | 6:41 am

    Hated to be a noob and ask someone, but was reading through trying to figure out the problem,
    couldnt believe how easy a fix the zoom was…
    i’ve been living with a messed up window forever. lol.

  21. Anonymous
    May 5th, 2008 | 9:03 am

    Uhh.. hit the + button in the upper left…

  22. June 3rd, 2008 | 9:14 am

    [...] Here’s a whole bunch of tips. What usually does it for me is changing the doc position to the left (external monitor is on the right), zoom window and then resetting the doc back to the bottom. [...]

  23. August 11th, 2008 | 9:36 am

    Moving the dock temporarily worked for me too! Thanks!

  24. Martin
    August 30th, 2008 | 5:49 am

    The zoom or the + button works great to re-size the window and get it back on the screen. Thanks for that.
    However, I there is a similar problem that it does not solve.

    I don’t know the official term for this UI element, but sometimes a windows will create a drop down panel or pane which descends from the top as an attached sheet or page. Got that? To see an example take a look at the apple mail (mail.app) program. Mail > Preferences > Rules. Select a rule > EDIT rule. The rule specifications are shown on drop down pane (or panel or sheet). This pane is not re-sized when the window is re-sized by the zoom or the (+) button.

    The rule pane is taller than my screen and I cannot reach the corner to re-size it. I also cannot get to the (Cancel) or (OK) buttons at the bottom of the screen to dismiss the panel. The rule “News From Apple” that is pre-configured has many conditions and is too long to close. This is on leopard on a MacBook. How could this slip by testing?

    Any ideas on how to re-size this pane.

  25. mactime
    October 16th, 2008 | 4:28 pm

    best and quickest thing to do is go into settings / displays – then temporarily choose a different display setting that will show the window with tab. shorten the window with the (now visible) tab and revert to your previous display setting. Good LUCK!

  26. Del
    November 8th, 2008 | 3:35 am

    I had the same issue with iTunes – the window/zoom did not help, it was just switching between the two views. However, when I kept the alt key while selecting the window/zoom from the menu, I got the whole window back on my screen.

  27. bekwkw
    November 24th, 2008 | 1:38 pm

    When I get this problem, I close the app and trash its prefs. This resets the window position back to its default (usually top-left of the left-hand monitor).

    MacHD –> Users –> MacHD –> Library –> Preferences

    Good luck,
    bekwkw

  28. Fito
    December 3rd, 2008 | 9:26 pm

    Go to System Preferences –> Displays and select any other resolution and then select back your preferred resolution. This will make all windows’ size to fit into the resolution you have chosen. Voila! Solved!

  29. December 8th, 2008 | 4:45 am

    Thanks SO MUCH for that applescript!

    I run TD Ameritrade’s Command Center and
    like most Java apps, it’s a bit dumb about
    windows under OS X Leopard.

    Did the trick!

    Foob

  30. Ilya
    December 10th, 2008 | 11:50 am

    Here’s another solution: activate Spaces, and drag the window from there :)

  31. February 17th, 2009 | 5:41 pm

    resizing the screen; say to 640×480 then back again fixed it for me :D

  32. March 6th, 2009 | 4:42 am

    I had heaps of truble with this, none of the scripts worked, but this app does! the window was stuck in a mode wich did not allow resize, but i could move the top up, and then grab the rezie button.

    http://www.macosxhints.com/article.php?story=20061025155640986

  33. March 7th, 2009 | 2:48 pm

    Option clicking the zoom button (upper right corner) didn’t work for me. However, option clicking the zoom button and then option clicking the green button did the job.

  34. March 10th, 2009 | 1:53 pm

    Same problem for me. Sadly the change of screen resolution didn’t work for me, however the AppleScript worked great. Thank you very much!

  35. MacBook Pro
    March 17th, 2009 | 8:15 am

    Hold down Alt (also called Option) key, then click on green button in window. Problem solved.

  36. Mr. K
    April 15th, 2009 | 7:58 pm

    Option-clicking the green button didn’t work for me, and we shouldn’t have to ditz with scripting to fix things like this. That’s Apple’s job.

    I finally fixed my one problem (a Mail rules window) by switching screen resolutions a few times.

  37. Anonymous
    April 17th, 2009 | 9:49 am

    click window-zoom! easy!

  38. Adrian
    April 24th, 2009 | 10:40 pm

    Maybe this is a simple approach but it worked for me.

    1. Change resolution to something other than your current setting.
    2. Change resolution back to original resolution.

    :)

    P.S. If the window doesn’t get sized properly, resize will in secondary resolution.

  39. frabber
    June 15th, 2009 | 12:59 am

    Thanks for reset perspective in eclipse trick!

  40. July 28th, 2009 | 9:05 pm

    Thanks bekwkw!! Your solution (delete the application’s preferences file) was the ONLY one that worked for me. I’m running Leopard on a Power Mac G5. I’m not a newbie but I definitely didn’t feel like running any applescripts. Deleting a file is SO much easier :) Thanks a billion!

    -Bill-

  41. Max van der Stam
    August 14th, 2009 | 12:15 pm

    You don’t need any applescripts whatsoever to fix an off-screen resize problem like the one described in the OP.

    Just change the resolution of Mac OSX to a “stretched” resolution and then back to the optimal resolution. That will cause all windows currently opened to resize themselves accordingly.

    Hope that helped some people :)

  42. yoko
    August 25th, 2009 | 9:55 am

    The window zoom thing works for most applications, but not for itunes! Max van der stam- THANK YOU!!!!

  43. Zimmen
    September 4th, 2009 | 2:05 am

    TO solve this once and for all … in SnowLeopard create a service, addl utilities -> Run applescript, input none and add this script (modified Marc’s script):

    on run {input, parameters}
    tell application “System Events”
    set ActiveApp to ¬
    (get name of first process whose frontmost is true) as string
    try
    tell process ActiveApp
    set position of window 1 to {0, 22}
    set size of window 1 to {800, 600}
    end tell
    on error
    display dialog “Script failed on = ” & ActiveApp
    end try
    end tell

    return input
    end run

    Assign a shortcut and voila, solved! even in iTunes

  44. September 15th, 2009 | 9:59 pm

    Thanks everyone, trying to resize my itunes window was driving me crazy. option/click on zoom did the trick. i can now go to sleep. Cheers!

  45. ovalking
    October 1st, 2009 | 4:05 am

    Changing screen resolution is not a solution if it is System Preferences that is off the edge of the screen!
    I’ve had trouble with some TVs where the menu bar is off the top of the screen so you can’t even get to the Apple menu.
    However, I found option F14 opened the Displays Preferences. But it was still an issue if that window was then out of sight.
    Another problem I have is with low screen resolutions, you can’t get to the bottom of a window that is taller than the screen. Why won’t it let me move a window above the menu bar?
    G.

  46. Matt
    October 15th, 2009 | 12:58 pm

    oh god, i’ve tried all of the above and still no success! my window doesnt have any of the options mentioned in the window option and the scripts come up with errors. I’ve resized my display many times and tried rearranging the screens and the dock but still had no luck at all. Trashing the preferences did nothing too :(

  47. WiseMax
    October 21st, 2009 | 5:56 pm

    I had the iTunes window problem. Zooming would simply change it to the miniplayer (…)

    Then I used Alt(Option for the veterans)-Zoom (the green “+” button) and it made the miracle.

    Gee, I never expected such a flaw from Apple’UI – having in mind that they *should* know that having the resize click area in only one spot (precisely the easiest to fall victim of oversizing / off-screen) would sometimes lead to trouble.

    In Windows, as long as you have a resizable window and two of the sides (one vertical and one horizontal) available, you can always fully resize. Same goes for just any corner.
    That’s a little better thought of.

  48. October 23rd, 2009 | 9:47 pm

    Option – Click on the green maximize button of any finder window.

  49. November 23rd, 2009 | 9:15 pm

    I changed my screen resolution in System Preferences > Displays to something lower (like 1280 x something) with that specific App open, and it changed the size for me automatically. Once you’ve changed the size of that app, you can change back to your regular resolution.

  50. Anonymous
    December 18th, 2009 | 1:30 am

    tell application “iTunes”
    set bounds of window 1 to {50, 100, 100, 100}
    end tell

    (you can replace itunes with the name of the application you are using)

Leave a reply