diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index f61f3902bb..7162187a23 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -233,6 +233,7 @@ + (void)initialize [NSNumber numberWithBool:NO], MMSuppressTerminationAlertKey, [NSNumber numberWithBool:YES], MMNativeFullScreenKey, [NSNumber numberWithDouble:0.25], MMFullScreenFadeTimeKey, + [NSNumber numberWithBool:NO], MMUseCGLayerAlwaysKey, nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:dict]; diff --git a/src/MacVim/MMCoreTextView.m b/src/MacVim/MMCoreTextView.m index 9a5a8a6d93..07afb59b11 100644 --- a/src/MacVim/MMCoreTextView.m +++ b/src/MacVim/MMCoreTextView.m @@ -132,6 +132,8 @@ - (id)initWithFrame:(NSRect)frame if (!(self = [super initWithFrame:frame])) return nil; + cgLayerEnabled = [[NSUserDefaults standardUserDefaults] + boolForKey:MMUseCGLayerAlwaysKey]; cgLayerLock = [NSLock new]; // NOTE! It does not matter which font is set here, Vim will set its diff --git a/src/MacVim/Miscellaneous.h b/src/MacVim/Miscellaneous.h index 909484daec..68380bb99a 100644 --- a/src/MacVim/Miscellaneous.h +++ b/src/MacVim/Miscellaneous.h @@ -52,6 +52,7 @@ extern NSString *MMSuppressTerminationAlertKey; extern NSString *MMNativeFullScreenKey; extern NSString *MMUseMouseTimeKey; extern NSString *MMFullScreenFadeTimeKey; +extern NSString *MMUseCGLayerAlwaysKey; // Enum for MMUntitledWindowKey diff --git a/src/MacVim/Miscellaneous.m b/src/MacVim/Miscellaneous.m index 9a80706a54..5351e43d25 100644 --- a/src/MacVim/Miscellaneous.m +++ b/src/MacVim/Miscellaneous.m @@ -48,6 +48,7 @@ NSString *MMNativeFullScreenKey = @"MMNativeFullScreen"; NSString *MMUseMouseTimeKey = @"MMUseMouseTime"; NSString *MMFullScreenFadeTimeKey = @"MMFullScreenFadeTime"; +NSString *MMUseCGLayerAlwaysKey = @"MMUseCGLayerAlways";