System settings not detected on GNOME when using Wayland
In the ESR 128 branch with my dev build I noticed that when I switch my system to the HighContrast theme, it was not being detected in Tor Browser. Which means that the chrome and "about:" pages are not using the prefers-contrast themeing.
Update: Also confirmed that other system settings are also being ignored.
After some debugging, it seems that gtk_settings_get_default "gtk-theme-name" is returning "Adwaita" rather than "HighContrast".
I tested with Tor Browser 13.5 stable, Tor Browser 13.5a9, and the latest Firefox tip, and they all detect the high contrast theme. And checking the gtk_settings_get_default in python with GTK 3, and it also returns the system theme "HighContrast".
Running the ./firefox script directly, it will detect the high contrast theme. So it seems to be triggered by something in ./start-tor-browser. The most minimal changes I could make to ./start-tor-browser to get the high contrast theme to be used was both:
- remove the
GSETTINGS_BACKEND=memoryenvironment variable, and - prevent the
HOMEoverride from reaching./firefox.
So I'm guessing both GSETTINGS_BACKEND and the HOME override are preventing the system settings from being read. There is a good chance this will also effect other system settings.
Not sure what could have changed in mozilla-central or our 128 rebase to make the difference. There was nothing obvious in the git log. Note that the most relevant file is widget/gtk/nsLookAndFeel.cpp.
It could be that this would only effect the dev build. We should test this with the 128 nightly once we have it.
/cc @boklm maybe you have an idea, and maybe this is more of a tor-browser-build issue.