Can I prevent OS X from resizing and moving windows when sleeping while attached to an external monitor?

I have my Retina Macbook Pro connected to a ASUS 2560x1440 display via the HDMI port. I keep the laptop lid closed so the monitor is the only display in use.

When I sleep my computer (via hot corners if it matters) and wake it back up, all the windows are resized and in the upper left hand corner. My assumption is that it is resizing and repositioning them for the built in display. Is there a way to prevent this from happening so I don't have to resize and move all my windows when I use the computer again?


Solution 1:

Go into the menu on your external monitor. If there's an option that allows one device to toggle the power on the other via HDMI, make sure this is deselected (honestly, I don't think this will have an effect as your laptop is doing the driving, but for the sake of troubleshooting...).

I too use an MBP Retina with external monitor (via HDMI). If I shut off the external monitor while it has application windows in its desktop, the screen on my laptop refreshes and said windows are moved to my laptop's display. However, if I power the external monitor back on, these application windows "automagically" move back to where they were (same location and size) on the external' Desktop (as long as I haven't shut down the computer in the meantime). So, it seems one solution (if you're hard set against also using your laptop' display) is to leave the laptop open, but decrease the brightness of the screen to 0. I do this all the time when watching a movie on the big screen, and, truly, the laptop' profile is no less "bulky" than it would be if it was closed. An additional benefit to this method is that the laptop stays cooler (than it otherwise would by closing it). You can verify this with any free temperature-monitoring app.

If the above does not work or is otherwise intolerable, I would guess that a solution could be programmed, though I'm not sure where one would start with this.

Solution 2:

I don't know if you can prevent it, but I use an app called Stay by Cordless Dog ($15, free trial), which keeps windows in place between display configuration changes.