Running g-s via dbus-run-session leads into XWayland applications not respecting a different set GTK Theme
When setting a different GTK Theme for applications via g-tweaks (not Adwaita), applications will use that theme when they are running.
However, this does not apply to XWayland applications when g-s is running via dbus-run-session:
- Start a normal g-s session on wayland.
- Set a different GTK Theme for applications via g-tweaks (in my case, I use the plata-theme)
- Open any XWayland application that has a titlebar, e.g. Firefox
Observation: The previously set GTK Theme is applied in the Firefox window.
- Close the Firefox window.
- Start g-t (or any other terminal) and run another g-s session via
dbus-run-session -- env MUTTER_DEBUG_DUMMY_MONITORS_SPECS=2560x1440 MUTTER_DEBUG_DUMMY_MONITOR_SCALES=1 gnome-shell --nested --wayland
- Run inside that new session any XWayland application that has a titlebar, e.g. Firefox
Observation: The XWayland application doesn't use the custom GTK Theme, instead it uses the Adwaita GTK Theme.
This only happens with XWayland applications, native Wayland applications are not affected by this issue.
This is how the Firefox window should look like (normal session with the custom theme applied):
And this is how the Firefox window should not look like (Firefox in a seperate session (via dbus-run-session) also with the custom theme applied):
This issue kinda reminds me of #771 (closed) that happened after some of the Xwayland on demand work landed. Therefore adding here @carlosg
Packages: mutter/master, g-s/master, gjs/master
Distro: Archlinux