[wayland] Enforce the wayland QPA
This requires a change present in Qt 5.4.2, without the startup will freeze. A warning message is shown if the compiled Qt version is not at least 5.4.2. It's only a warning and an ifdef as distros might backport the required change.
This commit is contained in:
parent
371bd4c24f
commit
f73da18f2e
1 changed files with 7 additions and 0 deletions
|
@ -318,6 +318,13 @@ KWIN_EXPORT int kdemain(int argc, char * argv[])
|
||||||
if (signal(SIGHUP, KWin::sighandler) == SIG_IGN)
|
if (signal(SIGHUP, KWin::sighandler) == SIG_IGN)
|
||||||
signal(SIGHUP, SIG_IGN);
|
signal(SIGHUP, SIG_IGN);
|
||||||
|
|
||||||
|
// enforce wayland plugin, unfortunately command line switch has precedence
|
||||||
|
setenv("QT_QPA_PLATFORM", "wayland", true);
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 2))
|
||||||
|
// TODO: remove warning once we depend on Qt 5.5
|
||||||
|
qWarning() << "QtWayland 5.4.2 required, application might freeze if not present!";
|
||||||
|
#endif
|
||||||
|
|
||||||
qputenv("WAYLAND_SOCKET", QByteArray::number(server->createQtConnection()));
|
qputenv("WAYLAND_SOCKET", QByteArray::number(server->createQtConnection()));
|
||||||
KWin::ApplicationWayland a(argc, argv);
|
KWin::ApplicationWayland a(argc, argv);
|
||||||
a.setupTranslator();
|
a.setupTranslator();
|
||||||
|
|
Loading…
Reference in a new issue