File tree Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,14 @@ - (void)dealloc
108
108
[super dealloc ];
109
109
}
110
110
111
+ - (BOOL ) canBecomeMainWindow {
112
+ return YES ;
113
+ }
114
+
115
+ - (BOOL ) canBecomeKeyWindow {
116
+ return YES ;
117
+ }
118
+
111
119
- (BOOL )hideTablineSeparator : (BOOL )hide
112
120
{
113
121
BOOL isHidden = [tablineSeparator isHidden ];
@@ -227,4 +235,15 @@ - (IBAction)realToggleFullScreen:(id)sender
227
235
#endif
228
236
}
229
237
238
+ - (void )setToolbar : (NSToolbar *)toolbar
239
+ {
240
+ if ([[NSUserDefaults standardUserDefaults ]
241
+ boolForKey: MMNoTitleBarWindowKey]) {
242
+ // MacVim can't have toolbar with No title bar setting.
243
+ return ;
244
+ }
245
+
246
+ [super setToolbar: toolbar];
247
+ }
248
+
230
249
@end // MMWindow
Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ - (id)initWithVimController:(MMVimController *)controller
130
130
| NSMiniaturizableWindowMask | NSResizableWindowMask
131
131
| NSUnifiedTitleAndToolbarWindowMask ;
132
132
133
+ if ([[NSUserDefaults standardUserDefaults ]
134
+ boolForKey: MMNoTitleBarWindowKey]) {
135
+ // No title bar setting
136
+ styleMask &= ~NSTitledWindowMask ;
137
+ }
138
+
133
139
// Use textured background on Leopard or later (skip the 'if' on Tiger for
134
140
// polished metal window).
135
141
if ([[NSUserDefaults standardUserDefaults ] boolForKey: MMTexturedWindowKey]
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ extern NSString *MMTranslateCtrlClickKey;
37
37
extern NSString *MMTopLeftPointKey;
38
38
extern NSString *MMOpenInCurrentWindowKey;
39
39
extern NSString *MMNoFontSubstitutionKey;
40
+ extern NSString *MMNoTitleBarWindowKey;
40
41
extern NSString *MMLoginShellKey;
41
42
extern NSString *MMUntitledWindowKey;
42
43
extern NSString *MMTexturedWindowKey;
Original file line number Diff line number Diff line change 29
29
NSString *MMTopLeftPointKey = @" MMTopLeftPoint" ;
30
30
NSString *MMOpenInCurrentWindowKey = @" MMOpenInCurrentWindow" ;
31
31
NSString *MMNoFontSubstitutionKey = @" MMNoFontSubstitution" ;
32
+ NSString *MMNoTitleBarWindowKey = @" MMNoTitleBarWindow" ;
32
33
NSString *MMLoginShellKey = @" MMLoginShell" ;
33
34
NSString *MMUntitledWindowKey = @" MMUntitledWindow" ;
34
35
NSString *MMTexturedWindowKey = @" MMTexturedWindow" ;
You can’t perform that action at this time.
0 commit comments