[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.
This commit is contained in:
Martin Gräßlin 2015-10-29 10:08:23 +01:00
parent 2c4ed0aca1
commit 28992c3d31

View file

@ -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();