Bug 440354

Summary: flatpak Wayland GTK applications don't use correct KDE color scheme
Product: [Plasma] xdg-desktop-portal-kde Reporter: Thanos Apostolou <thanosapostolou>
Component: generalAssignee: Jan Grulich <jgrulich>
Status: ASSIGNED ---    
Severity: normal CC: a.d+kde, nate, poperigby
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot from flatseal application running under wayland with bad fonts and wrong theme

Description Thanos Apostolou 2021-07-28 13:20:58 UTC
Created attachment 140369 [details]
Screenshot from flatseal application running under wayland with bad fonts and wrong theme

SUMMARY
Flatpak applications running on Wayland don't use the gtk theme neither the system fonts and look really bad. Also they seem to use the gtk filechooser instead of the kde one. It seems like the xdg-desktop-portal-kde not working at all for wayland apps. I have installed xsettingsd so applications use the correct theme/fonts/filepicker when running in X11 session or through Xwayland. Installing also xdg-desktop-portal-gtk makes the applications to use the correct theme and fonts but also the gtk filepicker instead of the kde one.

STEPS TO REPRODUCE
1. Install only xdg-desktop-portal and xdg-desktop-portal-kde (without xdg-desktop-portal-gtk)
2. Use a gtk flatpak application that uses Xwayland and verify that uses the correct theme/fonts/filechooser.
3. Use a gtk flatpak application that uses Wayland and see that uses the wrong theme/fonts as well as the gtk filechooser.

STEPS TO REPRODUCE with firefox:
1. Use firefox from flathub which uses Xwayland and verify that uses the correct theme/fonts/filechooser.
2. Run firefox with MOZ_ENABLE_WAYLAND=1 to run it as a wayland app and see that uses the wrong theme/fonts as well as the gtk filechooser.


EXPECTED RESULT
Wayland applications should use the correct theme/fonts and filechooser by only having installed xdg-desktop-portal-kde.


SOFTWARE/OS VERSIONS
xdg-desktop-portal-kde version: 5.22.4
Linux: Archlinux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
same result with version 5.22.3
Comment 1 Nate Graham 2021-07-28 14:18:26 UTC
The font issue should be fixed in git master; can still confirm the theme issue.
Comment 2 Nate Graham 2022-01-18 19:44:34 UTC
The theme issue is now fixed too, but the colors are still wrong now.

Once that's fixed, this should all be working properly, hopefully!
Comment 3 Bug Janitor Service 2023-01-02 02:36:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/146