Merge pull request #811 from ychin/startup-nonnative-fullscreen-fix

Fix starting up in non-native fullscreen resulting in black screen
This commit is contained in:
Yee Cheng Chin
2018-12-10 04:40:51 -08:00
committed by GitHub
2 changed files with 9 additions and 3 deletions
+8 -3
View File
@@ -137,8 +137,13 @@ defaultAdvanceForFont(NSFont *font)
boolForKey:MMBufferedDrawingKey];
cgBufferDrawNeedsUpdateContext = NO;
cgLayerEnabled = [[NSUserDefaults standardUserDefaults]
boolForKey:MMUseCGLayerAlwaysKey];
cgLayerEnabled = NO;
if (!cgBufferDrawEnabled) {
// Buffered draw supercedes the CGLayer renderer, which is deprecated
// and doesn't actually work in 10.14+.
cgLayerEnabled = [[NSUserDefaults standardUserDefaults]
boolForKey:MMUseCGLayerAlwaysKey];
}
cgLayerLock = [NSLock new];
// NOTE! It does not matter which font is set here, Vim will set its
@@ -795,7 +800,7 @@ defaultAdvanceForFont(NSFont *font)
- (void)setCGLayerEnabled:(BOOL)enabled
{
if (cgContext)
if (cgContext || cgBufferDrawEnabled)
return;
cgLayerEnabled = enabled;
+1
View File
@@ -348,6 +348,7 @@
// GUIEnter auto command could cause this).
[fullScreenWindow enterFullScreen];
fullScreenEnabled = YES;
shouldResizeVimView = YES;
} else if (delayEnterFullScreen) {
// Set alpha to zero so that the decorated window doesn't pop up
// before we enter full-screen.