Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Exit full-screen if the window moves

The window is not supposed to move in full-screen mode so if this
happens then exit full-screen.  This situation can occur e.g. if the
window is on a screen that gets unplugged.
  • Loading branch information...
commit e1ece272faa633b707b08fff1ed9f9aa5966f26c 1 parent 73b5d18
Björn Winckler authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/MacVim/MMWindowController.m
9 src/MacVim/MMWindowController.m
View
@@ -765,6 +765,15 @@ - (void)windowDidMove:(NSNotification *)notification
if (!setupDone)
return;
+ if (fullscreenEnabled) {
+ // HACK! The full-screen is not supposed to be able to be moved. If we
+ // do get here while in full-screen something unexpected happened (e.g.
+ // the full-screen window was on an external display that got
+ // unplugged) and we handle this situation by leaving full-screen.
+ [self leaveFullscreen];
+ return;
+ }
+
if (windowAutosaveKey) {
NSRect frame = [decoratedWindow frame];
NSPoint topLeft = { frame.origin.x, NSMaxY(frame) };
Please sign in to comment.
Something went wrong with that request. Please try again.