Mac OS X doesn't trigger resize events when Sublime Text 2 is in fullscreen, and I unplug/plug-in my secondary monitor

Brad Gessler 9 years ago updated 9 years ago 1

Scenario: I'm using Sublime Text 2 on my big ass 30" Cinema Display in fullscreen. I get tired of sitting in my office so I unplug the monitor from my laptop and go into the living room. 

Problem: Sublime Text cuts off my editing window because it still thinks its plugged into a 30" screen. I exit fullscreen, the go back into it.

Fix: We've dealt with similar issues in one of our apps and this little API hook came to the rescue: http://www.cocoabuilder.com/archive/cocoa/1951-notification-of-resolution-arrangement-of-monitor-change.html

Could you wire up this hook so that it triggers a fullscreen resize when I unplug my monitor?


Looks like this is reported at http://sublimetext.userecho.com/topic/42491-gets-stuck-in-full-screen-mode-if-its-on-a-secondary-monitor/ as well.