Commit fae658ae authored by David Edmundson's avatar David Edmundson

Default X font DPI to 96 on wayland

As otherwise we duplicate wayland scaling.

Possibly not needed when we support xdg-output, as then xwayland will
get the corrected post-scaling resolution.

Was done in startkde in one place, but not in the settings.

Differential Revision: https://phabricator.kde.org/8287
parent ab828372
......@@ -795,7 +795,7 @@ void KFonts::save()
#if HAVE_X11
// if the setting is reset in the module, remove the dpi value,
// otherwise don't explicitly remove it and leave any possible system-wide value
if (dpi == 0 && dpi_original != 0) {
if (dpi == 0 && dpi_original != 0 && !KWindowSystem::isPlatformWayland()) {
QProcess proc;
proc.setProcessChannelMode(QProcess::ForwardedChannels);
proc.start("xrdb", QStringList() << "-quiet" << "-remove" << "-nocpp");
......
......@@ -541,6 +541,9 @@ void runRdb( uint flags )
//user has set to use when under wayland - as X apps will be scaled by the compositor
if (KWindowSystem::isPlatformWayland()) {
dpi = cfgfonts.readEntry( "forceFontDPIWayland", 0);
if (dpi == 0) { //with wayland we want xwayland to run at 96 dpi (unless set otherwise) as we have wayland scaling on top
dpi = 96;
}
} else {
dpi = cfgfonts.readEntry( "forceFontDPI", 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment