Permalink
Browse files

fix unable to change mainWindow's title

  • Loading branch information...
1 parent be10bcf commit afa691376e2d4a9a41a3538dd422aa3a2b5ab634 Antoine Mercadal committed Sep 2, 2011
Showing with 4 additions and 5 deletions.
  1. +2 −2 AppKit/CPWindow/CPWindow.j
  2. +2 −3 AppKit/Platform/CPPlatformWindow.j
@@ -480,7 +480,7 @@ CPTexturedBackgroundWindowMask
[self close];
_platformWindow = aPlatformWindow;
- [_platformWindow setTitle:_title];
+ [_platformWindow _setTitle:_title window:self];
if (wasVisible)
[self orderFront:self];
@@ -1360,7 +1360,7 @@ CPTexturedBackgroundWindowMask
_title = aTitle;
[_windowView setTitle:aTitle];
- [_platformWindow setTitle:_title];
+ [_platformWindow _setTitle:_title window:self];
[self _synchronizeMenuBarTitleWithWindowTitle];
}
@@ -259,13 +259,12 @@ var PrimaryPlatformWindow = NULL;
return [CPPlatform isBrowser];
}
-- (void)setTitle:(CPString)aTitle
+- (void)_setTitle:(CPString)aTitle window:(CPWindow)aWindow
{
_title = aTitle;
#if PLATFORM(DOM)
- if (_DOMWindow && _DOMWindow.document
- && (self != [CPPlatformWindow primaryPlatformWindow]))
+ if (_DOMWindow && _DOMWindow.document && (aWindow === [CPApp mainWindow]))
_DOMWindow.document.title = _title;
#endif
}

0 comments on commit afa6913

Please sign in to comment.