Closed Bug 1652220 Opened 3 years ago Closed 3 years ago

[CSD] Titlebar fails to switch to inactive style


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

78 Branch



85 Branch
Tracking Status
firefox85 --- fixed


(Reporter: joshas, Assigned: stransky)


(Blocks 1 open bug)



(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
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
[Linux] Create titlebar style from actual widget, r=jhorak
[Linux] Clean up titlebar setup, r=jhorak
Closed: 3 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.