Skip to content

Fix starting up in non-native fullscreen resulting in black screen #811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/MacVim/MMCoreTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,13 @@ - (id)initWithFrame:(NSRect)frame
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
Expand Down Expand Up @@ -795,7 +800,7 @@ - (void)performBatchDrawWithData:(NSData *)data

- (void)setCGLayerEnabled:(BOOL)enabled
{
if (cgContext)
if (cgContext || cgBufferDrawEnabled)
return;

cgLayerEnabled = enabled;
Expand Down
1 change: 1 addition & 0 deletions src/MacVim/MMWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ - (BOOL)presentWindow:(id)unused
// 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.
Expand Down