I connected my MacBook Air to an external projector (using a Mini DisplayPort to VGA adaptor) to give a Keynote presentation, enabled screen mirroring, gave my talk, then disconnected from the external display.
Now I have a black rectangle that covers up most of the screen, on one of my workspaces. The black rectangle covers up the menubar at the top and most of the real estate where the application is, so now I can't use any of the applications on that workspace. If I switch to another workspace (using three-fingered swipe right/left), the other workspaces don't have a black rectangle covering them -- only the workspace that was being displayed when I was connected to the external VGA projector.
How do I get rid of the black rectangle and restore my display?
Here's how the black rectangle looks:
And if I zoom out to view all workspaces, here's how they look (you can see that the black rectangle is present on only the one that was active when I had the external display connected):
The native resolution on my MacBook Air's internal LCD display is 1440x900. The project was displaying at 1280x800, I think (so when I connected to the external projector and mirror displays, my resolution changed to 1280x800, I think; when I disconnected, it switched back to 1440x900). I'm running Mac OS X 10.8.4 Build 12E55. This is a 13-inch mid-2012 MBA, with Intel HD Graphics 4000 512 MB graphics (according to About This Mac). Nothing jumps out to me in my system logs (viewed with the Console application).
One big honkin' clue is that the rectangle appears to be exactly 1280 pixels wide and 800 pixels high: which exactly the same dimensions as the resolution of the external projector, i.e., the resolution that was auto-selected by display mirroring when the external display was connected. It's like the area that it was using to draw on, when the external display was connected, is now blacked out and unavailable once I've disconnected the external display. This feels like it just has to be significant somehow. Does it give you any ideas?
Rebooting it makes the black rectangle go away, but this happens pretty much every time I use an external projector, so it's annoying to always have to reboot. The rectangle shows up reliably after using an external projector, but if I don't connect to an external projector, the black rectangle never shows up. As far as I can remember, I think the size of the black rectangle has consistently been the same as the resolution of the external projector, but I haven't checked super-carefully every time.