Open Bug 2089302 Opened 15 days ago Updated 9 days ago

Wayland opacity regions are incorrect when window is maximized

Categories

(Core :: Widget: Gtk, defect)

Firefox 159
defect

Tracking

()

REOPENED

People

(Reporter: 0456523, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

1.10 MB, application/zip
Details
262.88 KB, image/png
Details
162.84 KB, text/plain
Details
Attached file Archive.zip —

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

Steps to reproduce

  1. Make a userChrome.css (included in the attached zip) that makes the background and titlebar transparent but uses a :before to make the background gradient translucent without making the entire window translucent
  2. Start Firefox
  3. Maximize the window

Actual results

  • When the window is not maximized, the blur regions are correct (see 1A.png and 1B.png in the zip).
  • When the window is maximized, the blur regions are incorrect (see 2A.png and 2B.png; 2A_edited.png and 2B_edited.png point out the issues using red boxes).
  • I have a glass effect plugin installed in KDE. When I tell the glass effect to ignore opacity regions by enabling the "ignore blur regions" option, it appears correctly (3A.png and 3B.png), but this comes with a massive GPU and battery usage tax that I cannot afford, as it will shade the entire window area with the effect before pasting over the effect with the window contents, which is expensive and wasteful.

Expected results

The opacity regions should be set correctly when maximized, so that Firefox looks like 3A.png and 3B.png without having to enable the glass effect's "ignore blur regions" option.

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
Status: UNCONFIRMED → RESOLVED
Closed: 14 days ago
Duplicate of bug: 2073312
Resolution: --- → DUPLICATE

I will say, I'm not using fractional scaling (my scale is set to 100%), but I'll wait and see if the fix for that fixes this issue for me too.

I wonder how is that possible. If you use 100% scale, please run on terminal with MOZ_LOG="Widget:5" env variable, reproduce the issue and attach the log here.
Thanks

Status: RESOLVED → REOPENED
No longer duplicate of bug: 2073312
Ever confirmed: true
Flags: needinfo?(0456523)
Resolution: DUPLICATE → ---
Blocks: wayland
See Also: → 2073312
Attached file log.txt (obsolete) —

I can easily reproduce the issue by hitting alt to show the menubar. I can see in the log that when I open the menubar, it sets the opaque region like so:

[Parent 1492324: Main Thread]: D/Widget [7f00630fb800]: nsWindow::UpdateOpaqueRegionInternal() set opaque region [281,93] -> [1354 x 30]
[Parent 1492324: Main Thread]: D/Widget [7f00630fb800]: nsWindow::UpdateOpaqueRegionInternal() set opaque region [0,130] -> [1920 x 950]

I drew out that region in GIMP with opaque as red and transparent as green, and put it over a screenshot.
So I can see that firefox is at least claiming to set the correct region, but it seems that kwin might not be getting the memo? idrk

Flags: needinfo?(0456523)
Attached image image.png —

Here's the screenshot with the claimed region drawn on top.
The claimed region is correct and lines up, but the actual region being used by kwin does not line up, and the background bleeds through a part that kwin still thinks is opaque.

Please run with WAYLAND_DEBUG=1 - does the nsWindow::UpdateOpaqueRegionInternal() matches region passed to Wayland compositor?

Attached file log.txt —

From what I can see in the log, it seems to only do set_opaque_region 2 times out of the 8 times the opaque region is updated

Attachment #9678682 - Attachment is obsolete: true
Severity: -- → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: