activation: Be liberal about the StartupWMClass

Some apps (e.g. VirtualBox) are inconsistent there.
This commit is contained in:
Aleix Pol 2022-07-18 21:00:24 +02:00
parent c68a0f5dc0
commit 1cb2d38a64

View file

@ -42,7 +42,7 @@ static const QString windowDesktopFileName(Window *window)
// Fallback to StartupWMClass for legacy apps
const auto resourceName = window->resourceName();
const auto service = KApplicationTrader::query([&resourceName](const KService::Ptr &service) {
return service->property("StartupWMClass") == resourceName;
return service->property("StartupWMClass").toString().compare(resourceName, Qt::CaseInsensitive) == 0;
});
if (!service.isEmpty()) {