From 0e80a16db57cb194431725aa204e1fa871ea87c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 22 Feb 2016 23:00:43 +0100 Subject: [PATCH] restrict cross-vd activation to in-client distrib QDialog or at least QMessageBox does this and I doubt Lubos' idea was to "allow focus stealing if the client nags enough" - switching the VD is a major interrupt and prevented when a new window shows up. It should not be possible to stomp on ground and then receive focus - notably not on the other desktop. I assume the original idea was to let clients distribute focus *inside* across virtual desktops, maybe also permit when no client was active, but hardly otherwise. BUG: 359683 FIXED-IN: 5.6 REVIEW: 127153 --- activation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activation.cpp b/activation.cpp index 98c06c1935..b57fda886b 100644 --- a/activation.cpp +++ b/activation.cpp @@ -607,6 +607,9 @@ bool Workspace::allowClientActivation(const KWin::AbstractClient *c, xcb_timesta return true; } + if (!c->isOnCurrentDesktop()) // we allowed explicit self-activation across virtual desktops + return false; // inside a client or if no client was active, but not otherwise + // High FPS, not intr-client change. Only allow if the active client has only minor interest if (level > FSP::Medium && protection > FSP::Low) return false;