mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user