Skip to content

Commit

Permalink
Bug 1398582: Prevent drawing titles in title bars on macOS 10.13 when…
Browse files Browse the repository at this point in the history
… we don't want them. r=mstange
  • Loading branch information
Stephen A Pohl committed Sep 15, 2017
1 parent 65afe5f commit cbdf6d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions widget/cocoa/nsCocoaWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ static unsigned int WindowMaskForBorderStyle(nsBorderStyle aBorderStyle)
mWindow = [[windowClass alloc] initWithContentRect:contentRect styleMask:features
backing:NSBackingStoreBuffered defer:YES];

// By default, hide window titles.
[mWindow setTitleVisibility:NSWindowTitleHidden];

// setup our notification delegate. Note that setDelegate: does NOT retain.
mDelegate = [[WindowDelegate alloc] initWithGeckoWindow:this];
[mWindow setDelegate:mDelegate];
Expand Down Expand Up @@ -1840,9 +1843,11 @@ DesktopIntRect newBounds(NSToIntRound(aX), NSToIntRound(aY),
if ([mWindow drawsContentsIntoWindowFrame] && ![mWindow wantsTitleDrawn]) {
// Don't cause invalidations.
[mWindow disableSetNeedsDisplay];
[mWindow setTitleVisibility:NSWindowTitleHidden];
[mWindow setTitle:title];
[mWindow enableSetNeedsDisplay];
} else {
[mWindow setTitleVisibility:NSWindowTitleVisible];
[mWindow setTitle:title];
}

Expand Down

0 comments on commit cbdf6d6

Please sign in to comment.