Closed Bug 1768815 Opened 3 years ago Closed 3 years ago

Firefox not detecting system light/dark mode transition on Linux

Categories

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

Firefox 100
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: aliakbarmostafaei, Unassigned)

References

Details

Attachments

(3 files)

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

Steps to reproduce:

  1. Enable "System theme - auto" in the themes
  2. Change system theme from dark to theme or vice versa

Actual results:

Firefox is stuck in Dark mode no matter what!

Expected results:

Firefox adapts to system Light/Dark mode.

Additional info:

OS: Fedora Workstation 36
DE: GNOME 42.1

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

Emilio, any idea here?
Thanks.

Flags: needinfo?(emilio)
Priority: -- → P3

Works for me here...

  • Does it work after Firefox restarts?
  • Is there something interesting in ~/.config/gtk-3.0/settings.ini?
  • Do you have Adwaita-dark selected in GNOME Tweak's "appearance" tab?
  • Can you run firefox with MOZ_LOG=LookAndFeel:5 firefox >out.log 2>&1 and attach out.log here?

Thanks

Flags: needinfo?(emilio) → needinfo?(aliakbarmostafaei)

Thank you @emilio ! It was the "Legacy Applications" option in the GNOME Tweaks - Appearance which was set to "Adwaita-dark", I changed it to "Adwaita-default" and Firefox adapted to Light mode!

This must have been a new option introduced in GNOME 42, otherwise I would have checked it before posting, my apologies!

Flags: needinfo?(aliakbarmostafaei)

Thanks. I don't think it's a Firefox bug. I could repro with those settings, and at first I was confused because we try to honor the XDG preference over the theme (bug 1751432).

But when you select "light" in GNOME settings the preference is 0 (no-preference) rather than 2 (light) (see https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings).

So that might be worth a bug in GNOME settings...

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID

Filed a gnome-control-center issue. We could work around this by moving the case 0: case to just assume light here, but that is a bit unfortunate IMO.

Thank you for the followup issue on GNOME, I guess this has something to do with the migration to libadwaita on GNOME 42, and now they consider GTK apps "Legacy" (hence the name "Legacy Applications" inside Tweaks app) and the Light/Dark switch inside the Settings probably broadcasts the transition signal only to apps adopting the new libadwaita design and not GTK apps!

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

Attachment

General

Creator:
Created:
Updated:
Size: