mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
559a247d34
In the legacy renderer, the view gets invalidated frequently in both non-native fullscreen and no-titlebar modes. Fix no-titlebar mode to auto-set CGLayer similar to non-native fullscreen so it would work properly. This doesn't affect 10.14 Mojave or above as it uses a newer renderer that doesn't have this issue. Fix #490
54 lines
1.5 KiB
Objective-C
54 lines
1.5 KiB
Objective-C
/* vi:set ts=8 sts=4 sw=4 ft=objc:
|
|
*
|
|
* VIM - Vi IMproved by Bram Moolenaar
|
|
* MacVim GUI port by Bjorn Winckler
|
|
*
|
|
* Do ":help uganda" in Vim to read copying and usage conditions.
|
|
* Do ":help credits" in Vim to see a list of people who contributed.
|
|
* See README.txt for an overview of the Vim source code.
|
|
*/
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
@class MMVimView;
|
|
|
|
@interface MMFullScreenWindow : NSWindow {
|
|
NSWindow *target;
|
|
MMVimView *view;
|
|
NSPoint oldPosition;
|
|
NSString *oldTabBarStyle;
|
|
int options;
|
|
int state;
|
|
|
|
// These are only valid in full-screen mode and store pre-fu vim size
|
|
int nonFuRows, nonFuColumns;
|
|
|
|
// These store the size vim had right after entering fu mode
|
|
int startFuRows, startFuColumns;
|
|
|
|
// This stores the contents of fuoptions_flags at fu start time
|
|
int startFuFlags;
|
|
|
|
// Controls the speed of the fade in and out.
|
|
double fadeTime;
|
|
double fadeReservationTime;
|
|
|
|
// For pre-10.14 we manually sets CGLayer mode, so need to remember the original state
|
|
BOOL origCGLayerEnabled;
|
|
}
|
|
|
|
- (MMFullScreenWindow *)initWithWindow:(NSWindow *)t view:(MMVimView *)v
|
|
backgroundColor:(NSColor *)back;
|
|
- (void)setOptions:(int)opt;
|
|
- (void)enterFullScreen;
|
|
- (void)leaveFullScreen;
|
|
- (void)centerView;
|
|
|
|
- (BOOL)canBecomeKeyWindow;
|
|
- (BOOL)canBecomeMainWindow;
|
|
|
|
- (void)applicationDidChangeScreenParameters:(NSNotification *)notification;
|
|
@end
|