Bug 1576391 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We added this override in bug 1400057 to avoid titlebar glitches. It's a hack and we should try to remove it again in order to reduce our chances of breakage when Apple makes changes to NSThemeFrame in the future.

We can do this once we've completed the tasks in this bug's "Depends on" list.

Here's the description of why the override is needed at the moment:

```
    // Override the _wantsFloatingTitlebar method to return NO, because of two problems:
    // When we're not using CoreAnimation, the "floating titlebar" overlaps in a glitchy way with
    // the NSOpenGLContext when we're drawing in the titlebar. When we *are* using CoreAnimation,
    // there are no titlebar glitches, but a different problem appears in builds that link against
    // the 10.14 SDK: In windows where _wantsFloatingTitlebar returns YES, the root NSView contains
    // an additional view that provides a window background. This confuses our setContentView
    // override which will place the content view *below* that background view, effectively hiding
    // the content view completely. The floating titlebar view also slightly clips the bottom of the
    // window buttons which we forcefully move down with our override of _closeButtonOrigin.
```
We added this override in bug 1400057 to avoid titlebar glitches. It's a hack and we should try to remove it again in order to reduce our chances of breakage when Apple makes changes to NSThemeFrame in the future.

We can do this once we've completed the tasks in this bug's "Depends on" list.

Here's the description of why the override is needed at the moment:

```
    // Override the _wantsFloatingTitlebar method to return NO, because it works around multiple
    // problems:
    // When we're not using CoreAnimation, the "floating titlebar" overlaps in a glitchy way with
    // the NSOpenGLContext when we're drawing in the titlebar. These glitches do not happen when we
    // use CoreAnimation.
    // An additional problem appears in builds that link against the 10.14 SDK: In windows where
    // _wantsFloatingTitlebar returns YES, the root NSView contains an additional view that provides
    // a window background. This confuses our setContentView override which will place the content
    // view *below* that background view, effectively hiding the content view completely.
    // The floating titlebar view also slightly clips the bottom of the window buttons which we
    // forcefully move down with our override of _closeButtonOrigin.
```
We added this override in bug 1400057 to avoid titlebar glitches. It's a hack and we should try to remove it again in order to reduce our chances of breakage when Apple makes changes to NSThemeFrame in the future.

In order to do this, we need to remove the setContents override and find a solution for clipped window buttons.

Here's the description of why the override is needed at the moment:

```
    // Override the _wantsFloatingTitlebar method to return NO, because it works around multiple
    // problems:
    // When we're not using CoreAnimation, the "floating titlebar" overlaps in a glitchy way with
    // the NSOpenGLContext when we're drawing in the titlebar. These glitches do not happen when we
    // use CoreAnimation.
    // An additional problem appears in builds that link against the 10.14 SDK: In windows where
    // _wantsFloatingTitlebar returns YES, the root NSView contains an additional view that provides
    // a window background. This confuses our setContentView override which will place the content
    // view *below* that background view, effectively hiding the content view completely.
    // The floating titlebar view also slightly clips the bottom of the window buttons which we
    // forcefully move down with our override of _closeButtonOrigin.
```

Back to Bug 1576391 Comment 0