diff --git a/src/main_x11.cpp b/src/main_x11.cpp index 74b162cbec..466ff7b6d2 100644 --- a/src/main_x11.cpp +++ b/src/main_x11.cpp @@ -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);