Add full screen window title to "Window" menu

This commit is contained in:
Bjorn Winckler
2010-12-30 15:20:08 +01:00
parent 3a2e09f42d
commit deb3e9a368
2 changed files with 17 additions and 3 deletions
+6 -1
View File
@@ -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
+11 -2
View File
@@ -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