Do not read Xft.dpi on platforms that shouldn't be using Xft settings
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 <morten.sorvig@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This commit is contained in:
parent
aa504fc2fa
commit
c7fec68e19
@ -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 <QDebug>
|
||||
#include <QtAlgorithms>
|
||||
|
||||
#include <qpa/qplatformservices.h>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
#include <private/qmath_p.h>
|
||||
#include <QtGui/private/qhighdpiscaling_p.h>
|
||||
@ -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<QByteArray> desktopEnv = services->desktopEnvironment().split(':');
|
||||
useXftConf = desktopEnv.contains("GNOME") || desktopEnv.contains("UNITY") || desktopEnv.contains("XFCE");
|
||||
}
|
||||
if (!useXftConf)
|
||||
return;
|
||||
|
||||
int offset = 0;
|
||||
QByteArray resources;
|
||||
while (true) {
|
||||
|
Loading…
Reference in New Issue
Block a user