Bug 888615 - Only draw window titles for windows with drawtitle=true. r=smichaud

This commit is contained in:
Markus Stange 2013-12-17 17:11:14 +01:00
Родитель 3b7de5fbc9
Коммит 1540e74713
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -2266,7 +2266,7 @@ nsChildView::UpdateTitlebarCGContext()
[NSGraphicsContext setCurrentContext:context];
// Draw the title string.
if ([frameView respondsToSelector:@selector(_drawTitleBar:)]) {
if ([window wantsTitleDrawn] && [frameView respondsToSelector:@selector(_drawTitleBar:)]) {
[frameView _drawTitleBar:[frameView bounds]];
}
@ -3710,7 +3710,12 @@ NSEvent* gLastDragMouseDownEvent = nil;
- (void)drawTitleString
{
NSView* frameView = [[[self window] contentView] superview];
BaseWindow* window = (BaseWindow*)[self window];
if (![window wantsTitleDrawn]) {
return;
}
NSView* frameView = [[window contentView] superview];
if (![frameView respondsToSelector:@selector(_drawTitleBar:)]) {
return;
}