If KWin Wayland is set up to let Xwayland clients to scale themselves,
set the configuration values we need for them to do so properly.
To do so, we extend the fonts kcminit module to provide a meaningful
default DPI to scale to and we set some environment variables for
applications to scale as expected. These are the ones we already were
using to properly scale in X11 sessions.
As we have discussed, this mechanism is considered Plasma-internal, meaning
that we don't have to keep the KServiceTypeTrader stuff around.
To avoid duplicating the KCMs or having to split the kcminit stuff in a separate
binary, symlinks are used to query the available plugins. By having a unified "kcminit"
symbol for the function which will get called, we can drop the need for the
custom property.
Task: https://phabricator.kde.org/T14335
Prequisite for using only embedded json metadata for the KCMs, see https://phabricator.kde.org/T14517
StartPlasma's fontDPI syncs the current font DPI to xrdb, which affects
font DPI for X applications (inc apps run in xwayland)
This is seldom used on wayland as with framebuffer scaling you don't
want to adjust your font DPI, but it is used by some users. As it's
xrdb, it needs to come after Xwayland is started for the wayland case.
The goal of this patch is to move towards killing the
startplasma-waylandsession binary as well as just being better design to
have these things comparmentalised.
kcminit is very early in the boot process before all GUI apps with the
exception of ksplash. I don't think this will make a big difference as
that's just a picture anyway?