mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-05-28 00:21:57 +02:00
Add full screen window title to "Window" menu
This commit is contained in:
@@ -148,9 +148,14 @@
|
||||
|
||||
// NOTE: Calling setTitle:nil causes an exception to be raised (and it is
|
||||
// possible that 'target' has no title when we get here).
|
||||
if ([target title])
|
||||
if ([target title]) {
|
||||
[self setTitle:[target title]];
|
||||
|
||||
// NOTE: Cocoa does not add borderless windows to the "Window" menu so
|
||||
// we have to do it manually.
|
||||
[NSApp changeWindowsItem:self title:[target title] filename:NO];
|
||||
}
|
||||
|
||||
[self setOpaque:[target isOpaque]];
|
||||
|
||||
// don't set this sooner, so we don't get an additional
|
||||
|
||||
@@ -360,8 +360,17 @@
|
||||
|
||||
- (void)setTitle:(NSString *)title
|
||||
{
|
||||
if (title)
|
||||
[decoratedWindow setTitle:title];
|
||||
if (!title)
|
||||
return;
|
||||
|
||||
[decoratedWindow setTitle:title];
|
||||
if (fullscreenEnabled) {
|
||||
[fullscreenWindow setTitle:title];
|
||||
|
||||
// NOTE: Cocoa does not update the "Window" menu for borderless windows
|
||||
// so we have to do it manually.
|
||||
[NSApp changeWindowsItem:fullscreenWindow title:title filename:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setDocumentFilename:(NSString *)filename
|
||||
|
||||
Reference in New Issue
Block a user