From 28992c3d3106d9c104f145548ce18a31af44449a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 29 Oct 2015 10:08:23 +0100 Subject: [PATCH] [wayland] Force Qt::AA_NoHighDpiScaling on Qt 5.6 We already unset QT_DEVICE_PIXEL_RATIO to ensure to keep out of high dpi scaling. Now with Qt 5.6 we also need to set the attribute. Without we crash on startup as we don't have a screen that early and well Qt doesn't check whether it's null. --- main_wayland.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main_wayland.cpp b/main_wayland.cpp index c687bee0aa..be576248f1 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -379,6 +379,9 @@ int main(int argc, char * argv[]) qunsetenv("QT_DEVICE_PIXEL_RATIO"); qunsetenv("QT_IM_MODULE"); qputenv("QSG_RENDER_LOOP", "basic"); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) + QCoreApplication::setAttribute(Qt::AA_NoHighDpiScaling, true); +#endif KWin::ApplicationWayland a(argc, argv); a.setupTranslator();