Closed Bug 1652220 Opened 4 years ago Closed 4 years ago

[CSD] Titlebar fails to switch to inactive style

Categories

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

78 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: joshas, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

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

Steps to reproduce:

Turn off "Title bar" option in customization window. Alt+tab to another program with smaller window, e.g. Calculator, or just start another program that opens new window.

Actual results:

Firefox titlebar (one with all tabs and close button) color remains in "active" style while window is actually in background. (top part of attached screenshot)

Expected results:

After opening new program or switching to another window Firefox titlebar must instantly update to correct "inactive" style.
While other program window is active and Firefox window is visible moving mouse over Firefox titlebar (titlebar only, just moving over Firefox window does not update titlebar style) causes it to refresh and display in correct "inactive" style. (bottom part of attached screenshot)
Fedora 32 with Wayland.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Inspector: Rules
Product: Firefox → DevTools
Component: Inspector: Rules → General
OS: Unspecified → Linux
Product: DevTools → Firefox
Hardware: Unspecified → x86_64
Component: General → Widget: Gtk
Product: Firefox → Core
Blocks: gtktitlebar
Priority: -- → P3

Yes, I do see that too. We fails to repaint the titlebar.

Assignee: nobody → stransky

It's caused by https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0bc4d93567a76664acb2a5ba1fc081a4f0ec31f2&tochange=9eb877be55acd8b5e27ea70a4d766946d5d8e60a
Looks like the widget cache can't deliver inactive titlebar state so we always draw it as active.

  • Ask for alpha visual for toplevel windows on composited screens only.
  • Rename TitlebarCanUseShapeMask() to TitlebarUseShapeMask() to control titlebar shape mask usage.
  • Allow to use shape mask under widget.titlebar-x11-use-shape-mask preference, it's off by default.
  • Simplify HideTitlebarByDefault(), remove compositing/shape mask check as we use RGBA visual only now.

Depends on D98597

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/ad5f28dbb4dc [Linux] Create titlebar style from actual widget, r=jhorak https://hg.mozilla.org/integration/autoland/rev/2783a73bd4ec [Linux] Clean up titlebar setup, r=jhorak
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch

This patch causes a regression - a black background is painted as a border over whole window so we don't utilize opaque region and the titlebar corners are gray. I guess it's related to the window style, will look at it.

Regressions: 1681191
QA Whiteboard: [qa-85b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: