Open Bug 1762061 Opened 3 years ago Updated 11 months ago

Top window border is missing in Windows

Categories

(Core :: Widget: Win32, defect, P3)

Firefox 98
Desktop
Windows
defect

Tracking

()

People

(Reporter: back5576, Unassigned)

Details

(Whiteboard: [win:sizing])

Attachments

(2 files)

Attached image firefox_border_bug.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

Deleted and re-installed Firefox

Actual results:

Top border is missing

Expected results:

Top border should be same as other three borders. Attached screenshot shows the top-left corner showing that left border is the blue that I have as system setting. But the top border is missing.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Win32' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Win32
Product: Firefox → Core

I wish to add some additional information.
I observe this bug on Windows Server 2016.
No other applications on Windows Server 2016 have this issue.
I do not observe the bug in Windows 10.
I do not observe this bug on Windows Server 2019.

Are you using multiple monitors? Does changing the window size make the border reappear?

Flags: needinfo?(back5576)

I do have two monitors. Changing the window size does not make the border appear.

Flags: needinfo?(back5576)

(In reply to back5576@gmail.com from comment #4)

I do have two monitors. Changing the window size does not make the border appear.

Could you tell me how your monitors are arranged? Are they side-by-side, or stacked vertically? Does changing the arrangement of your monitors in Windows settings change anything regarding the window border?

Flags: needinfo?(back5576)

Side by side.
Vertical stack didn't change missing top border.

Flags: needinfo?(back5576)

Thanks for confirming.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [win:sizing]

(Drive-by, as I noticed this bug and can't un-see it)
Still happens on Win 10. Of note, setting browser.tabs.inTitlebar to 0 recovers the top border, but also the Windows' native titlebar - Do we "clip away" the titlebar, along with the border?

No, we just ask Windows (not) to draw the native titlebar at all.

Unfortunately, I can't repro on Win10: I get the accent color on all four sides. What's your display setup — that is, how many monitors do you have, and for each one, what's its resolution and scale-factor?

Flags: needinfo?(dshin)

2 monitors, 100% scaling on both, 1920x1080 and 2560x1440.

Moving monitors around, changing window size & entering/exiting fullscreen did not change the lack of the top border for me.
I tried unplugging each monitor's HDMI/DP (+ reboot to avoid any state shenanigans), so it was basically a single monitor setup, and it was still missing.

Flags: needinfo?(dshin)

I also have two monitors. 1920x1200.
I'll point out too that Chrome also has this problem on my computer. I just checked several other apps and don't see this problem with them.
When a Firefox or Chrome window has focus, only the side and bottom borders get painted blue. The top does not.

I'll point out too that Chrome also has this problem on my computer.

So you're right - when it's active, at least, there's a grey bar on the right and the bottom side but not the top and the left side...?
However, when the window is inactive, the grey borders seem correct.

Actually, the bug goes away for me when I check the box in Windows' Personalization - "Show accent color on the following surfaces" - "Title bars and window borders". This show the top border with accent color when active, and grey color when inactive, like the rest of the sides, as expected. However, there still are some oddities:

  • When Windows using the light theme, the top inactive border is noticeably darker.
  • When switching Firefox in and out of the active window, I sometimes see a visible delay in the top border being painted the accent color.
  • Turning off the accent color leaves Firefox's top border to be that accent color, but only when it's active (Reverts to missing top border behaviour on restart).

(In reply to David Shin[:dshin] from comment #12)

Actually, the bug goes away for me when I check the box in Windows' Personalization - "Show accent color on the following surfaces" - "Title bars and window borders". This show the top border with accent color when active, and grey color when inactive, like the rest of the sides, as expected. However, there still are some oddities:

  • When Windows using the light theme, the top inactive border is noticeably darker.
  • When switching Firefox in and out of the active window, I sometimes see a visible delay in the top border being painted the accent color.
  • Turning off the accent color leaves Firefox's top border to be that accent color, but only when it's active (Reverts to missing top border behaviour on restart).

I've managed to reproduce the first two of these. When "Show accent color on [...] title bars and window borders" is off, I can also reproduce the behavior of not having a border on the top edge of an inactive window even though borders are present on the sides and bottom. (This is somewhat obscured by the drop-shadow that Win10 puts on windows by default, but that can be turned off via "View advanced system settings" > "Performance".)

However, I haven't found any combination of settings that causes the accent color to be shown on only the sides and bottom of a Firefox window, as seen in the initial screenshot. @back5576, could you list off (or take screenshots of) the current state of your "Color settings" panel?

Flags: needinfo?(back5576)
Attached image colorsettings.png

My current color settings

Flags: needinfo?(back5576)

I've attached a new file with a screenshot

FWIW that border is added in CSS here.

(In reply to Ray Kraesig [:rkraesig] from comment #13)

However, I haven't found any combination of settings that causes the accent color to be shown on only the sides and bottom of a Firefox window, as seen in the initial screenshot. @back5576, could you list off (or take screenshots of) the current state of your "Color settings" panel?

... because I had been testing on Windows 10, and had missed comment 1 noting that this was in Windows Server 2016. The behavior is trivially reproducible there; and, as in Win10, setting the Show color on title bar toggle makes it vanish. The bug :dshin and I are seeing is probably related, but subtly different — possibly just due to which color is called ActiveBorder under Server 2016?

(In reply to Emilio Cobos Álvarez (:emilio) from comment #16)

FWIW that border is added in CSS here.

That's in a @media (-moz-windows-accent-color-in-titlebar) group, though — it shouldn't explain the behavior we're seeing when that setting is off. I'm also mildly surprised that we're seeing full borders of consistent width when that setting is on!

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Windows
Priority: P2 → P3
Hardware: Unspecified → Desktop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: