diff --git a/src/MacVim/MMFullscreenWindow.m b/src/MacVim/MMFullscreenWindow.m index a0e9891a30..ca6ceeeb59 100644 --- a/src/MacVim/MMFullscreenWindow.m +++ b/src/MacVim/MMFullscreenWindow.m @@ -116,6 +116,12 @@ { ASLogDebug(@"Enter full screen now"); + // HACK! Put window on all Spaces to avoid Spaces from moving the full + // screen window to a separate Space from the one the decorated window is + // occupying. The collection behavior is restored further down. + NSWindowCollectionBehavior wcb = [self collectionBehavior]; + [self setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces]; + // fade to black Boolean didBlend = NO; CGDisplayFadeReservationToken token; @@ -231,6 +237,9 @@ kCGDisplayBlendNormal, .0, .0, .0, false); CGReleaseDisplayFadeReservation(token); } + + // Restore collection behavior (see hack at start of this method). + [self setCollectionBehavior:wcb]; } - (void)leaveFullscreen