Unnecessary space when sliding menubar down in fullscreen on new Macbook Pros with notch
Categories
(Core :: Widget: Cocoa, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: joao.sarmento, Assigned: emilio)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:93.0) Gecko/20100101 Firefox/93.0
Steps to reproduce:
- Using new Macbook Pro 14'', updated Monterey on 12.0.1
- Set firefox as full screen, menubar is hidden
- Hovering to menubar theres a huge blank gap between resize icons and tabs, instead of side-by-side
Actual results:
theres a huge blank gap between resize icons and tabs, instead of side-by-side
Expected results:
the gap shouldn't be there
Comment 1•3 years ago
|
||
Hi,
I have tested your issue on latest FF release 93, Beta 94 and latest Nightly build 95.0a1 and could not reproduce it using macOS Monterey version 12.0.1 on MacBook Pro (13-inch 2017).
If the issue is still reproducible on your end, can you please retest this using latest Nightly build (https://nightly.mozilla.org/) and report back the results? When doing this, please use a new clean Firefox profile (https://goo.gl/AWo6h8) to eliminate the potential causes.
Thanks for the report.
(In reply to Alin Ilea from comment #1)
Hi,
I have tested your issue on latest FF release 93, Beta 94 and latest Nightly build 95.0a1 and could not reproduce it using macOS Monterey version 12.0.1 on MacBook Pro (13-inch 2017).
If the issue is still reproducible on your end, can you please retest this using latest Nightly build (https://nightly.mozilla.org/) and report back the results? When doing this, please use a new clean Firefox profile (https://goo.gl/AWo6h8) to eliminate the potential causes.Thanks for the report.
Hello,
As provided on the ticket summary and description, this is for Macbook Pro 14'' and i'm assuming on Macbook Pro 16'' as well. Most likely due to notch behavior. So it's not happening on 13 inches versions.
Thanks
Comment 3•3 years ago
•
|
||
We also tried to reproduce it on macbook pro 16" but with macOS Big Sur version 11.6, without success. Unfortunately we don't have Macbook Pro 14'' or Macbook Pro 16'' with macOS 12 Monterey in order to test it using an more appropriate environment.
What I can do for now is to assign a component for this ticket and maybe the developers can help more.
Thanks for the collaboration.
Later today I'll try to make a screenrecording reproducing this issue and upload in this ticket
Best,
Comment 5•3 years ago
|
||
This requires a new Macbook Pro with a notch at the top of the screen.
Native full screen mode behaves differently on those machines.
On machines without a notch, the window covers the entire screen, and moving the mouse to the top of the screen slides down a menubar over the window.
On machines with a notch, the window does not cover the entire screen: there is a reserved black area at the top. Moving the mouse to the top of the screen reveals the menubar which appears in the reserved black areas, with no slide-over.
I am also seeing this behavior (MacBook Pro 14" 8C M1 Pro) and can confirm it's happening in the newest nightly (96.0a1) as well.
Comment 7•3 years ago
|
||
Here's a video of the bug
Comment 8•3 years ago
|
||
The severity field is not set for this bug.
:spohl, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 11•3 years ago
|
||
I think the issue is at widget/cocoa/nsCocoaWindow.mm:3712
:
CGFloat shiftByPixels = (mInitialTitlebarHeight + mMenuBarHeight) * aShownAmount;
This always shifts by the menu bar height, but with a notch it's not necessary since the menu bar will be shown in the notch area.
A very crude first attempt to fix it:
NSScreen* targetScreen = [NSScreen mainScreen];
CGFloat shiftByPixels;
if (@available(macOS 12.0, *) && (targetScreen.safeAreaInsets.top != 0)) {
shiftByPixels = mInitialTitlebarHeight * aShownAmount;
} else {
shiftByPixels = (mInitialTitlebarHeight + mMenuBarHeight) * aShownAmount;
}
Comment 12•3 years ago
|
||
This issue is also happening on 2021 Macbook Pro 16" when using the nest nightly build Version 96.0a1
Comment 14•3 years ago
|
||
This can actually be reproduced without a notch. On macOS 12, open System Preferences > Dock & Menu Bar, and uncheck the setting "Automatically hide and show the menu bar in full screen." I have this same issue on a 2018 MBP.
Assignee | ||
Comment 15•3 years ago
|
||
Not sure if there's a better way to do this, but this works on a 2018 mbp with
the "Automatically show and hide the menubar on full screen" setting on and
off.
Updated•3 years ago
|
Assignee | ||
Comment 16•3 years ago
|
||
If someone with an M1 mac can test a build from https://treeherder.mozilla.org/#/jobs?repo=try&revision=010c9cd8d3c67e5242506244a207239a0b303e69 it'd be great :-)
Reporter | ||
Comment 17•3 years ago
|
||
I'm happy to, where can I find the executable?
Assignee | ||
Comment 18•3 years ago
|
||
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/X9gR9UA5Qy61ugQ9yFSXyw/runs/0/artifacts/public/build/target.dmg is a link to the DMG (if you click on the "B", there's an "Artifacts and debugging tools" tab, which has a link to all build artifacts, I just copied it from there for convenience).
If it doesn't work on the M1 mac, we may need a separate check for safe area insets similar to the one suggested by comment 11.
Reporter | ||
Comment 19•3 years ago
|
||
Not working
Assignee | ||
Comment 20•3 years ago
|
||
This should fix the M1 mac case.
Assignee | ||
Comment 21•3 years ago
|
||
(In reply to João from comment #19)
Not working
Alright, not totally unexpected, patch for that case above. Can you try a build from https://treeherder.mozilla.org/#/jobs?repo=try&revision=f919b4e929718b025830f959292253a7204acc76 when it's available?
Reporter | ||
Comment 22•3 years ago
|
||
I only see log files under Artifacts and Debugging tools.
Could you please provide the link to dmg? Sorry for the inconvenience
Comment 23•3 years ago
|
||
The build from #21 failed. Maybe the build system is using a too old MacOS SDK?
Comment 24•3 years ago
|
||
According to Apple's documentation safeAreaInsets property on NSScreen was introduced in Xcode 13. From the build logs I think the build system is using the SDK from Xcode 12.
Assignee | ||
Comment 25•3 years ago
|
||
Ah, too bad, it built locally of course... I'm out for the day, will try to fix it up tomorrow.
Assignee | ||
Comment 26•3 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=89d0c9641b873c63ae73bade9ce78640d3dda62d should have working builds in a second.
Comment 27•3 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #26)
Tested the build on a MacBook pro 16" with notch: with the new build the issue is fixed.
Assignee | ||
Comment 28•3 years ago
|
||
Yay, thanks for testing it!
Comment 29•3 years ago
|
||
Comment 30•3 years ago
|
||
Comment 31•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/63c7b0bf7506
https://hg.mozilla.org/mozilla-central/rev/268cb02289ce
Comment 32•3 years ago
•
|
||
Was able to reproduce the issue on Firefox 95.0a1 (2021-10-26) under macOS 12.0.1 on a macbook pro mid 2015 by deactivating the pref mentioned in Comment 14.
The issue is fixed on Firefox 97.0a1 (2022-01-04) on the same system. Will verify on macbook with notch too, soon.
Comment 34•3 years ago
|
||
How do we feel about backing this out for now and testing a new fix across hardware/OS versions? Covering tab bars seems worse than displaying an extra gap in fullscreen for MacBooks with a notch. We also have more people with MacBooks with a notch now that could help implement/test a fix.
Comment 35•3 years ago
|
||
(In reply to Stephen A Pohl [:spohl] from comment #34)
How do we feel about backing this out for now and testing a new fix across hardware/OS versions? Covering tab bars seems worse than displaying an extra gap in fullscreen for MacBooks with a notch.
In my case the extra space is a constant issue which is fixed in 97.0a1, whereas I cannot reproduce the covering tab bars issue unless I activate the "Scale to fit below built-in camera" option, which is an option not normally active. Basically in my case I would much rather have the fix, but I understand other users with different configurations might be in a different situation.
Until a better fix is implemented, instead of completely reverting the fix would having the fix available through an about:config preference be an option?
Assignee | ||
Comment 36•3 years ago
|
||
Yeah, let me put this behind some sort of pref. But we should probably back out from 97, or uplift the pref + fix. On it.
Updated•3 years ago
|
Description
•