x11: Fix disabling high dpi scaling

Qt::AA_DisableHighDpiScaling has no any effect now.
This commit is contained in:
Vlad Zahorodnii 2023-03-03 12:14:43 +02:00
parent 219b6c6b50
commit a9dc50e22d

View file

@ -376,9 +376,13 @@ int main(int argc, char *argv[])
// enforce xcb plugin, unfortunately command line switch has precedence
setenv("QT_QPA_PLATFORM", "xcb", true);
// disable highdpi scaling
setenv("QT_ENABLE_HIGHDPI_SCALING", "0", true);
qunsetenv("QT_DEVICE_PIXEL_RATIO");
qunsetenv("QT_SCALE_FACTOR");
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
qunsetenv("QT_SCREEN_SCALE_FACTORS");
// KSMServer talks to us directly on DBus.
QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
// For sharing thumbnails between our scene graph and qtquick.
@ -393,8 +397,10 @@ int main(int argc, char *argv[])
KWin::ApplicationX11 a(argc, argv);
a.setupTranslator();
// reset QT_QPA_PLATFORM so we don't propagate it to our children (e.g. apps launched from the overview effect)
qunsetenv("QT_QPA_PLATFORM");
qunsetenv("QT_ENABLE_HIGHDPI_SCALING");
KSignalHandler::self()->watchSignal(SIGTERM);
KSignalHandler::self()->watchSignal(SIGINT);