wayland: Pick better initial window class string

With ksplash migrating to the layer-shell protocol, it no longer
provides an app id. This means that the window class string will be
different, e.g. "ksplashqml " instead of "ksplashqml ksplashqml", and
some effects (login, etc) will stop working as expected.

In order to keep effects working as before, this change adjusts the
window class initialization in WaylandClient so both the resource class
and the resource name are set to the executable file name.
This commit is contained in:
Vlad Zahorodnii 2021-04-19 10:50:41 +03:00
parent 675d5c4216
commit d6cca178f7

View file

@ -188,7 +188,8 @@ void WaylandClient::updateResourceName()
{ {
const QFileInfo fileInfo(surface()->client()->executablePath()); const QFileInfo fileInfo(surface()->client()->executablePath());
if (fileInfo.exists()) { if (fileInfo.exists()) {
setResourceClass(fileInfo.fileName().toUtf8()); const QByteArray executableFileName = fileInfo.fileName().toUtf8();
setResourceClass(executableFileName, executableFileName);
} }
} }