From c7fec68e1936576070d0fbac6cf40b818366d298 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 2 Dec 2019 14:08:29 +0100 Subject: Do not read Xft.dpi on platforms that shouldn't be using Xft settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only read this for desktop environments that have traditionally used these to set settings for other toolkits. Fixes: QTBUG-80323 Change-Id: Ifa8c2682301e69c2770d3734115080a0e6b4e85c Reviewed-by: Morten Johan Sørvig Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbscreen.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbscreen.cpp') diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp index 8da299d491..7c60ca06f9 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -41,6 +41,7 @@ #include "qxcbwindow.h" #include "qxcbcursor.h" #include "qxcbimage.h" +#include "qxcbintegration.h" #include "qnamespace.h" #include "qxcbxsettings.h" @@ -49,6 +50,7 @@ #include #include +#include #include #include #include @@ -356,6 +358,15 @@ static QFontEngine::SubpixelAntialiasingType parseXftRgba(const QByteArray& stri void QXcbVirtualDesktop::readXResources() { + const QPlatformServices *services = QXcbIntegration::instance()->services(); + bool useXftConf = false; + if (services) { + const QList desktopEnv = services->desktopEnvironment().split(':'); + useXftConf = desktopEnv.contains("GNOME") || desktopEnv.contains("UNITY") || desktopEnv.contains("XFCE"); + } + if (!useXftConf) + return; + int offset = 0; QByteArray resources; while (true) { -- cgit v1.2.3