xdgactivation: Demand attention when a process fails to resolve its token

In xdg_activation_v1, if a process fails to negotiate activation, at
least decorate it as demanding attention.
This will give apps ways to indicate attention is required. It can can also
help detect clients doing weird things.
This commit is contained in:
Aleix Pol 2022-04-06 00:33:21 +02:00 committed by Aleix Pol Gonzalez
parent 1762a59fb4
commit 52035f43b9

View file

@ -76,6 +76,7 @@ void XdgActivationV1Integration::activateSurface(SurfaceInterface *surface, cons
if (!m_currentActivationToken || m_currentActivationToken->token != token) {
qCDebug(KWIN_CORE) << "Refusing to activate " << client << " (provided token: " << token << ", current token:" << (m_currentActivationToken ? m_currentActivationToken->token : QStringLiteral("null")) << ")";
client->demandAttention();
return;
}