summaryrefslogtreecommitdiff
path: root/kde-plasma/kwin/files/kwin-5.24.4-xdgactivation-demand-attention.patch
blob: 8efa6b637222d91b834e49677d1ff60421579450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 5390a4978f3a3903ede15ecd94a750b37931fbd2 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Wed, 6 Apr 2022 00:33:21 +0200
Subject: [PATCH] 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.


(cherry picked from commit 52035f43b90738e2efb4fd7b482719c1ea458578)
---
 src/xdgactivationv1.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/xdgactivationv1.cpp b/src/xdgactivationv1.cpp
index e2270a3393..97f8575c29 100644
--- a/src/xdgactivationv1.cpp
+++ b/src/xdgactivationv1.cpp
@@ -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;
     }
 
-- 
GitLab