Open Bug 1880763 Opened 1 year ago Updated 9 months ago

Gap Between Title Bar and Window using Wayland, 150% Fractional Scaling

Categories

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

Firefox 122
defect

Tracking

()

People

(Reporter: lordmethenor, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0

Steps to reproduce:

  1. Set up wayland fractional scaling and set to 150% (I am using GNOME 45)
  2. Open Firefox
  3. Customize Toolbar
  4. Enable "Title Bar"
  5. Hit done

I am using a Framework Laptop 13 (12th Gen Intel) with a HIDPI panel.
My distro is Fedora 39 Workstation, and my DE is GNOME 45, which uses the Mutter compositor for wayland.

In order to ensure a clean config, I spun up a new VM with the same OS and DE and downloaded and ran the official tar.bz2, though I typically run the Fedora repo rpm and use a gtk3 theme.

While it isn't super visible, it is worse when I move the window, resize it, or open the overview.

I can sometimes see flickering around title bar in 125% fractional scaling, but the effect is much clearer (though still slight) at 150%.

Actual results:

There is a slight gap between the title bar and the rest of the window. In the gap, the wallpaper or a background window's color appears.

Expected results:

There should be no gap.

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3

I'm suspicious that problems with subsurface positioning when Mutter is running in fractional scaling mode might be the cause of this problem.

It looks like what's happening is that the Firefox subsurface isn't always aligned exactly with the bottom of the titlebar rendered by Gtk, so sometimes a sliver of the window behind the subsurface is visible. My recollection is that the Gtk toplevels have a transparent background (in order to support rounded corners when Firefox is drawing the titlebar?), so this means you see through the window to whatever is behind it.

It might be possible to work around this issue by having the Gtk toplevel window draw an opaque background when the Gtk titlebar is enabled.

I have reproduced this issue, and confirm that setting widget.transparent-windows to false in in about:config prevents the wallpaper (or another window) from being visible through the gap between the titlebar and window content. There's still a little bit of flickering visible as the window is scaled in the GNOME overlay, likely caused by the subsurface occasionally covering up the dark border at the bottom of the titlebar slightly.

To clarify, this issue is independent of whether or not Firefox itself is using fractional scale rendering (i.e. it occurs with both widget.wayland.fractional-scale.enabled=true and =false.)

(In reply to Calvin Walton from comment #4)

To clarify, this issue is independent of whether or not Firefox itself is using fractional scale rendering (i.e. it occurs with both widget.wayland.fractional-scale.enabled=true and =false.)

Can confirm. Still occurs at 200%.

What do we need to provide to confirm this bug?

(In reply to lordmethenor@outlook.com from comment #6)

What do we need to provide to confirm this bug?

You don't need to provide anything, I believe you.

Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to Martin Stránský [:stransky] (ni? me) from comment #7)

(In reply to lordmethenor@outlook.com from comment #6)

What do we need to provide to confirm this bug?

You don't need to provide anything, I believe you.

I apologize if it sounded like I thought you didn't. I was asking what I could provide to be helpful, not exasperated. The transparency fix has resolved the worst of the issue for me personally. Thank you for marking.

(In reply to lordmethenor@outlook.com from comment #8)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #7)

(In reply to lordmethenor@outlook.com from comment #6)

What do we need to provide to confirm this bug?

You don't need to provide anything, I believe you.

I apologize if it sounded like I thought you didn't. I was asking what I could provide to be helpful, not exasperated. The transparency fix has resolved the worst of the issue for me personally. Thank you for marking.

Sure, not a problem.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: